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 belopolsky
Recipients belopolsky
Date 2008-04-30.04:35:49
SpamBayes Score 0.008608573
Marked as misclassified No
Message-id <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za>
In-reply-to
Content
On Tue, Apr 29, 2008 at 10:36 PM, Guido van Rossum <guido@python.org> 
wrote:
..
>  Let's also fix __len__() so that it returns sys.{maxint,maxsize} when
>  the result doesn't fit in a Py_ssize_t.

http://mail.python.org/pipermail/python-3000/2008-April/013343.html

With attached patch given

class x:
    def __len__(self):
        return 2**100

len(x()) and len(range(2**100)) will return sys.maxsize.
History
Date User Action Args
2008-04-30 04:36:38belopolskysetspambayes_score: 0.00860857 -> 0.008608573
recipients: + belopolsky
2008-04-30 04:36:32belopolskysetspambayes_score: 0.00860857 -> 0.00860857
messageid: <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za>
2008-04-30 04:36:29belopolskylinkissue2723 messages
2008-04-30 04:36:27belopolskycreate