STINNER Victor added the comment: If someone wants to return a value larger than maxsize and support bool(): it is already possible right now by defining a __bool__ method no? If yes, I suggest to only document this CPython implementation detail (consequence of slots, for efficiency) and suggest to use __bool__ for such corner case.
I also dislike retrying to call "__len__" method instead of the slot. It can have annoying side effects. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29840> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com