Message290110
Mis-behaving classes have to be written in C. If the __len__ method in Python class returns a negative value, ValueError is raised in slot_sq_length().
PySequence_GetItem() already contains an assertion that sq_length returns negative value only when an exception is set. The patch just extends this to other cases of calling sq_length and mq_length. |
|
Date |
User |
Action |
Args |
2017-03-24 19:38:47 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, vstinner |
2017-03-24 19:38:47 | serhiy.storchaka | set | messageid: <1490384327.12.0.396978949699.issue29838@psf.upfronthosting.co.za> |
2017-03-24 19:38:47 | serhiy.storchaka | link | issue29838 messages |
2017-03-24 19:38:47 | serhiy.storchaka | create | |
|