This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author veky
Recipients veky
Date 2018-06-21.13:25:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529587521.24.0.56676864532.issue33933@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-06-21 13:25:21vekysetrecipients: + veky
2018-06-21 13:25:21vekysetmessageid: <1529587521.24.0.56676864532.issue33933@psf.upfronthosting.co.za>
2018-06-21 13:25:21vekylinkissue33933 messages
2018-06-21 13:25:21vekycreate