summaryrefslogtreecommitdiffstats
path: root/Lib/mimetypes.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-28 22:01:16 (GMT)
committerGuido van Rossum <guido@python.org>2003-01-28 22:01:16 (GMT)
commitac5b5d2e8b849c499d323b0263ace22e56b4f0d9 (patch)
tree4fa065587d1f06ea638dea49df848815c553b7b5 /Lib/mimetypes.py
parent7821d7230cde1f8e12894782fb59bf91dbd6d640 (diff)
downloadcpython-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 'Lib/mimetypes.py')
0 files changed, 0 insertions, 0 deletions