Issue1337

classification
Title: Add abstract PySequence.size() method
Type: Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pjenvey, stefan.richthofer, zyasoft
Priority: low Keywords:

Created on 2009-05-03.21:51:21 by pjenvey, last changed 2017-01-13.09:04:31 by stefan.richthofer.

Messages
msg4630 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-03.21:51:20
In some places PySequence (and IIRC some other places) assume __len__ 
returns the real length of a sequence. That's not always the case for 
derived objects. This is bound to break something at some point

Most places (outside of PySequence) use the real size when they should 
(e.g. PyList/Tuple/String call size/length on themselves instead of 
__len__ when needed) but the base PySequence doesn't have that luxury. 
It should have a size() method it can rely on
msg9633 (view) Author: Jim Baker (zyasoft) Date: 2015-03-12.00:31:22
2.7.1
History
Date User Action Args
2017-01-13 09:04:31stefan.richthofersetnosy: + stefan.richthofer
2015-03-12 00:31:22zyasoftsetnosy: + zyasoft
messages: + msg9633
2013-02-26 17:22:25fwierzbickisetnosy: + fwierzbicki
versions: + Jython 2.7
2009-05-03 21:51:21pjenveycreate