Message320178
Look at this:
>>> import bisect
>>> bisect.bisect({}, None)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
bisect.bisect({}, None)
TypeError: object of type 'dict' has no len()
Of course, objects of type 'dict' do have len. The problem is that bisect considers its first argument a sequence, which is very sensible to do (although, with ordered dicts, it's not the only sensible choice), but it gives a very wrong error message given that context.
At https://bugs.python.org/issue32500, R. David Murray told me to open this. |
|
Date |
User |
Action |
Args |
2018-06-21 13:25:21 | veky | set | recipients:
+ veky |
2018-06-21 13:25:21 | veky | set | messageid: <1529587521.24.0.56676864532.issue33933@psf.upfronthosting.co.za> |
2018-06-21 13:25:21 | veky | link | issue33933 messages |
2018-06-21 13:25:21 | veky | create | |
|