Mercurial > genshi > genshi-test
changeset 564:b3b07279b86c
Alias `__contains__` to `has_key` in `Context` class for code outside of Genshi that may expect that for some wild reason.
author | cmlenz |
---|---|
date | Fri, 13 Jul 2007 12:54:09 +0000 |
parents | 80fb59bd2342 |
children | aa8e85a4085e |
files | genshi/template/base.py genshi/template/eval.py |
diffstat | 2 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/genshi/template/base.py +++ b/genshi/template/base.py @@ -152,6 +152,7 @@ :param key: the name of the variable """ return self._find(key)[1] is not None + has_key = __contains__ def __delitem__(self, key): """Remove a variable from all scopes.
--- a/genshi/template/eval.py +++ b/genshi/template/eval.py @@ -392,6 +392,7 @@ BUILTINS.update({'Markup': Markup, 'Undefined': Undefined}) CONSTANTS = frozenset(['False', 'True', 'None', 'NotImplemented', 'Ellipsis']) + class ASTTransformer(object): """General purpose base class for AST transformations.