Re: [Python-Dev] Undocumented change / bug in Python3's PyMapping_Check

2009-05-06 Thread Nick Coghlan
John Millikin wrote: > In Python 2, PyMapping_Check will return 0 for list objects. In Python > 3, it returns 1. Obviously, this makes it rather difficult to > differentiate between mappings and other sized iterables. In addition, > it differs from the behavior of the ``collections.Mapping`` ABC --

[Python-Dev] Undocumented change / bug in Python3's PyMapping_Check

2009-05-04 Thread John Millikin
In Python 2, PyMapping_Check will return 0 for list objects. In Python 3, it returns 1. Obviously, this makes it rather difficult to differentiate between mappings and other sized iterables. In addition, it differs from the behavior of the ``collections.Mapping`` ABC -- isinstance([], collections.M