diff options
author | Guido van Rossum <guido@python.org> | 2001-09-25 03:43:42 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-25 03:43:42 +0000 |
commit | 38e5222a3cb1b521e9164e840c6b5fb8aca9e9eb (patch) | |
tree | a7f6329ff72c2e531743c1b07f488a98f2aa9d12 /Lib/test/test_repr.py | |
parent | b0108f02dce8812631b884ab1e35fad44fd8a1fa (diff) | |
download | cpython-38e5222a3cb1b521e9164e840c6b5fb8aca9e9eb.tar.gz |
Make __class__ assignment possible, when the object structures are the
same. I hope the test for structural equivalence is stringent enough.
It only allows the assignment if the old and new types:
- have the same basic size
- have the same item size
- have the same dict offset
- have the same weaklist offset
- have the same GC flag bit
- have a common base that is the same except for maybe the dict and
weaklist (which may have been added separately at the same offsets
in both types)
Diffstat (limited to 'Lib/test/test_repr.py')
0 files changed, 0 insertions, 0 deletions