File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1175,7 +1175,7 @@ class Counter:
1175
1175
* ** Any exception that happens inside the with block is passed to the exit() method.**
1176
1176
* ** If it wishes to suppress the exception it must return a true value.**
1177
1177
``` python
1178
- class MyOpen () :
1178
+ class MyOpen :
1179
1179
def __init__ (self , filename ):
1180
1180
self .filename = filename
1181
1181
def __enter__ (self ):
Original file line number Diff line number Diff line change 1120
1120
< li > < strong > Exit() should release the resources.</ strong > </ li >
1121
1121
< li > < strong > Any exception that happens inside the with block is passed to the exit() method.</ strong > </ li >
1122
1122
< li > < strong > If it wishes to suppress the exception it must return a true value.</ strong > </ li >
1123
- </ ul > < pre > < code class ="python language-python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> MyOpen</ span > < span class =" hljs-params " > () </ span > :</ span >
1123
+ </ ul > < pre > < code class ="python language-python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> MyOpen</ span > :</ span >
1124
1124
< span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> __init__</ span > < span class ="hljs-params "> (self, filename)</ span > :</ span >
1125
1125
self.filename = filename
1126
1126
< span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> __enter__</ span > < span class ="hljs-params "> (self)</ span > :</ span >
You can’t perform that action at this time.
0 commit comments