Dict Comprehensions - PEP 274
Donnal Walter
donnalcwalter at yahoo.com
Tue Feb 4 17:52:59 EST 2003
1. Is ``PEP 274 -- Dict Comprehensions`` still under active consideration?
If so, what is its present status?
2. Is there currently (under 2.2.2 or 2.3) a more elegant way to accomplish
the following:
class _node(object): pass
class Cell(_node): pass
class Assembly(_node):
def __getstate__(self):
state = {}
for name, attr in self.__dict__.items():
if isinstance(attr, _node):
state[name] = attr
return state
Donnal Walter
Arkansas Children's Hospital
More information about the Python-list
mailing list