changeset 118 | 8c7970520632 |
parent 117 | 8680c2333546 |
117:8680c2333546 | 118:8c7970520632 |
---|---|
84 |
84 |
85 ## with statement support ## |
85 ## with statement support ## |
86 |
86 |
87 def __enter__(self): |
87 def __enter__(self): |
88 self.init() |
88 self.init() |
89 return self |
|
89 |
90 |
90 def __exit__(self, exc_type, exc_val, exc_tb): |
91 def __exit__(self, exc_type, exc_val, exc_tb): |
91 self.close() |
92 self.close() |