Mercurial > gnulib
changeset 39065:4ee84016df38
module: __enter__ and __exit__ methods
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Sun, 22 Oct 2017 23:57:55 +0300 |
parents | 01a1f2665a4e |
children | 78be9f46d031 |
files | pygnulib/module.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/module.py Sun Oct 22 23:56:20 2017 +0300 +++ b/pygnulib/module.py Sun Oct 22 23:57:55 2017 +0300 @@ -78,6 +78,14 @@ 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()))