Message302290
Oh, I was aware of this issue for long time, but didn't have good opportunity for fixing it. And yes, making PyMapping_Items() (and friends) always returning a list looks like a reasonable option to me. This could fix similar bugs in third-party extensions. In Python 2 PyMapping_Items() is documented as returning a list, but actually it can return an arbitrary type. Authors of extensions could be fooled by the documentation and use concrete list API.
The drawback of this solution is some performance degradation in rare case of items() returning a tuple. |
|
Date |
User |
Action |
Args |
2017-09-15 18:53:05 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, Oren Milman |
2017-09-15 18:53:05 | serhiy.storchaka | set | messageid: <1505501585.25.0.929148817713.issue31486@psf.upfronthosting.co.za> |
2017-09-15 18:53:05 | serhiy.storchaka | link | issue31486 messages |
2017-09-15 18:53:05 | serhiy.storchaka | create | |
|