Source

pypy / pypy / objspace / std / iterobject.py

Author Commit Message Labels Comments Date
Philip Jenvey
move length_hint to space now that it's PEP'd
Branches
length-hint
Philip Jenvey
__length_hint__ comes from the type dict, not getattr thanks arigo
Branches
length-hint
Armin Rigo
Add a comment.
Branches
length-hint
Philip Jenvey
length_hint basics and some initial iterator support
Branches
length-hint
Armin Rigo
hg merge default
Branches
set-strategies
Philip Jenvey
whitespace
Lukas Diekmann
(cfbolz, l.diekmann): restructure some code: the speed hack in FastListIterator is no longer there, so we don't need to use extend here. Also, why was the generator path hidden in _init_from_iterable?
Branches
set-strategies
Armin Rigo
Kill this __init__, which nowadays contains just a duplicate of setting to w_seq --- already done in the parent __init__.
Maciej Fijalkowski
merge default
Branches
list-strategies
Armin Rigo
Fix annotation issues.
Armin Rigo
Add the requirement that W_XxxObject classes that are different implementations of the same app-level type should inherit from a common base class more precise than W_Object. This is actually easy, just by adding some empty W_AbstractXxxObject classes here and there. This property allows us to build the _interplevel_classes for-speed-only dictionary in a way that doesn't depend on dictionary order. Previously it would randomly pick a class if there are several ones, which might be (if you're unluckly) not the most commonly used one.
Carl Friedrich Bolz
merge default
Branches
list-strategies
Justin Peel
remove iter stuff that I hadn't intended to merge
Branches
unsigned-dtypes
Justin Peel
remove some commented code and skip a zjit test until we change llimpl
Branches
unsigned-dtypes
Carl Friedrich Bolz
merge default
Branches
list-strategies
Lukas Diekmann
Cast sequence to W_ListObject (translation fix)
Branches
list-strategies
Lukas Diekmann
Changed W_ListObject iterable to use getitem
Branches
list-strategies
Maciej Fijalkowski
revert changes that removed old code - we might actually want it
Maciej Fijalkowski
kill dead old commented out code
Branches
space-iterator-improvements
Benjamin Peterson
remove old review comments
Benjamin Peterson
merge cleanup-obspace-init, in which objspace initialization becomes pretty
Armin Rigo
Following CPython 2.5, remove __len__ on all iterator types. This should be reintroduced as __length_hint__ methods at some point; that's why I only commented the code out.
Armin Rigo
A W_FastSeqIterObject that is a lot more efficient than the W_SeqIterObject for lists and tuples.
Armin Rigo
untabify.
Anders Lehmann
dont use unwrap
Anders Lehmann
Added a reverse sequence iterator make sure to exhaust reverse iterator if the underlying sequence shrinks to less than the remaining items
Armin Rigo
* some clean-ups of W_SeqIterObject, trying to minimize the number of fields required on the iterator instances. * more tests. * why did lst.__reversed__() store the iterator on the list object?? Note that space.unwrap() should not be used; instead use space.int_w(), or space.str_w(), etc.
Anders Lehmann
added support for reverse iteration in W_SeqIterObject
Anders Lehmann
Addded some support for len(iter). This seems to work for list,tuples,str, dict, set Please review carefully (The W_DictIterObject changes are a bit scary)
Anders Chrigström
Fix sequencs iteration
  1. Prev
  2. 1
  3. 2
  4. Next