summaryrefslogtreecommitdiffstats
path: root/Demo/tix/bitmaps
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-07 20:20:11 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-07 20:20:11 (GMT)
commit8700b4281af0561d9aafd3cc14c44d79c2a0934b (patch)
tree51422e28ddd5eaf2624ff33a95603d5e8b71bfa6 /Demo/tix/bitmaps
parent9478d07ee71161a8098da53b4b902899f36bf6ba (diff)
downloadcpython-8700b4281af0561d9aafd3cc14c44d79c2a0934b.zip
cpython-8700b4281af0561d9aafd3cc14c44d79c2a0934b.tar.gz
cpython-8700b4281af0561d9aafd3cc14c44d79c2a0934b.tar.bz2
PySequence_Check(), PyMapping_Check(): only return true if the
corresponding "getitem" operation (sq_item or mp_subscript) is implemented. I realize that "sequence-ness" and "mapping-ness" are poorly defined (and the tests may still be wrong for user-defined instances, which always have both slots filled), but I believe that a sequence that doesn't support its getitem operation should not be considered a sequence. All other operations are optional though. For example, the ZODB BTree tests crashed because PySequence_Check() returned true for a dictionary! (In 2.2, the dictionary type has a tp_as_sequence pointer, but the only field filled is sq_contains, so you can write "if key in dict".) With this fix, all standalone ZODB tests succeed.
Diffstat (limited to 'Demo/tix/bitmaps')
0 files changed, 0 insertions, 0 deletions