Message292140
| Author |
vstinner |
| Recipients |
mark.dickinson, rhettinger, serhiy.storchaka, terry.reedy, vstinner |
| Date |
2017年04月22日.22:05:05 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwYGTJV-CHv2ksZTpNC6AaeqWNyO+uugQChtDGaLN_i9Ug@mail.gmail.com> |
| In-reply-to |
<1492874298.57.0.148487490346.issue29840@psf.upfronthosting.co.za> |
| Content |
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. |
|