]> Savannah Git Hosting - gnulib.git/commitdiff
module: __enter__ and __exit__ methods
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 22 Oct 2017 20:57:55 +0000 (23:57 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 22 Oct 2017 20:57:55 +0000 (23:57 +0300)
pygnulib/module.py

index 0dc1d4d48801acca8935f09712da8322c2f9c3b2..10cc6a42b38e86031f2b09b846406185dd647d96 100644 (file)
@@ -78,6 +78,14 @@ class Base:
         return result.strip() + "\n"
 
 
+    def __enter__(self):
+        return self
+
+
+    def __exit__(self, exctype, excval, exctrace):
+        pass
+
+
     def __hash__(self):
         return hash(tuple(self.__table.items()))