[Python-Dev] Accessing globals without dict lookup (original) (raw)
Fred L. Drake, Jr. fdrake@acm.org
Fri, 8 Feb 2002 15:50:03 -0500
- Previous message: [Python-Dev] Accessing globals without dict lookup
- Next message: [Python-Dev] Accessing globals without dict lookup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum writes:
def keys(self): return [c.objptr for c in self.__dict.keys() if c.objptr is not NULL]
I presume you meant values() here rather than keys()? The keys() method could simply delegate to self.__dict. I imagine most of us can fill in any additional dictionary methods, though.
-Fred
-- Fred L. Drake, Jr. PythonLabs at Zope Corporation
- Previous message: [Python-Dev] Accessing globals without dict lookup
- Next message: [Python-Dev] Accessing globals without dict lookup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]