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 eryksun
Recipients Dave Hibbitts, RazerM, eryksun, georg.brandl, mark.dickinson, paul.moore, pitrou, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-02-24.15:56:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> the sq_length slot in the weakproxy type is set to proxy_length.

Nice. Its tp_getattro gets in the way of using __len__ directly, but this can be side stepped by manually binding the descriptor:

    class Test(object):
        def __len__(self):
            return 2**31 + 5

    >>> t = Test()
    >>> p = weakref.proxy(t)
    >>> p.__len__()
    >>> type(p).__len__.__get__(p)()
Date User Action Args
2016-02-24 15:56:58eryksunsetrecipients: + eryksun, georg.brandl, paul.moore, mark.dickinson, pitrou, vstinner, tim.golden, zach.ware, serhiy.storchaka, steve.dower, RazerM, Dave Hibbitts
2016-02-24 15:56:58eryksunsetmessageid: <>
2016-02-24 15:56:58eryksunlinkissue26423 messages
2016-02-24 15:56:58eryksuncreate