[Zope-CVS] CVS: Packages/pypes/pypes - expression.py:1.8
Casey Duncan
casey at zope.com
Mon Apr 12 22:45:01 EDT 2004
Update of /cvs-repository/Packages/pypes/pypes
In directory cvs.zope.org:/tmp/cvs-serv21799
Modified Files:
expression.py
Log Message:
use vars() in place of dir() to get the builtin names
=== Packages/pypes/pypes/expression.py 1.7 => 1.8 ===
--- Packages/pypes/pypes/expression.py:1.7 Wed Mar 10 16:12:21 2004
+++ Packages/pypes/pypes/expression.py Mon Apr 12 22:44:59 2004
@@ -65,7 +65,8 @@
builtins unless specified in free_names.
"""
all_names = (
- Set(self._bindings.keys() + dir(__builtin__)) - Set(free_names))
+ Set(self._bindings.keys() + vars(__builtin__).keys())
+ - Set(free_names))
return self.names() - all_names
def freeOperands(self, free_names=[], _tree=None, _nodes=None):
@@ -85,7 +86,8 @@
if _nodes is None:
_nodes = []
all_names = (
- Set(self._bindings.keys() + dir(__builtin__)) - Set(free_names))
+ Set(self._bindings.keys() + vars(__builtin__).keys())
+ - Set(free_names))
for node in _tree.getChildNodes():
if isinstance(node, (ast.And, ast.Or, ast.Not)):
self.freeOperands(free_names, node, _nodes)
More information about the Zope-CVS
mailing list