diff options
author | Guido van Rossum <guido@python.org> | 2003-01-28 22:01:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-01-28 22:01:16 (GMT) |
commit | ac5b5d2e8b849c499d323b0263ace22e56b4f0d9 (patch) | |
tree | 4fa065587d1f06ea638dea49df848815c553b7b5 /Mac/Modules/file/filesupport.py | |
parent | 7821d7230cde1f8e12894782fb59bf91dbd6d640 (diff) | |
download | cpython-ac5b5d2e8b849c499d323b0263ace22e56b4f0d9.zip cpython-ac5b5d2e8b849c499d323b0263ace22e56b4f0d9.tar.gz cpython-ac5b5d2e8b849c499d323b0263ace22e56b4f0d9.tar.bz2 |
Instead of bad hacks trying to worm around the inherited
object.__reduce__, do a getattr() on the class so we can explicitly
test for it. The reduce()-calling code becomes a bit more regular as
a result.
Also add support slots: if an object has slots, the default state is
(dict, slots) where dict is the __dict__ or None, and slots is a dict
mapping slot names to slot values. We do a best-effort approach to
find slot names, assuming the __slots__ fields of classes aren't
modified after class definition time to misrepresent the actual list
of slots defined by a class.
Diffstat (limited to 'Mac/Modules/file/filesupport.py')
0 files changed, 0 insertions, 0 deletions