Mercurial > genshi > mirror
changeset 564:aeb89e9730df trunk
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 | 9d1c5c290254 |
children | 53b37e4f2921 |
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.