(muffed the first send...) >>>>> "Guido" == Guido van Rossum <guido at python.org> writes: >> Passing along a fragment from the psycopg list where Federico Di Gregorio >> (fog at initd.org) wrote: >> >> .... because on python 2.3 PyMapping_Check apperently return True for >> every new-type instance.... >> >> Is this true? If so, is it a bug? Guido> I don't see this. operator.isMappingType() maps directly to Guido> PyMapping_Check(); and I tried this: >>>> import operator >>>> operator.isMappingType(str) Guido> False >>>> class C(object): pass Guido> ... >>>> operator.isMappingType(C) Guido> False >>>> operator.isMappingType(C()) Guido> False >>>> operator.isMappingType({}) Guido> True >>>> Guido> Looks okay to me. :-) Guido> --Guido van Rossum (home page: http://www.python.org/~guido/) Good to hear, and straight from the horse's mouth! Nice to know about operator.isMappingType as well. I had no idea that it existed and didn't want to write C just to check this. Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4