Source

pypy / pypy / objspace / std / sliceobject.py

Author Commit Message Labels Comments Date
Carl Friedrich Bolz
rename this function to be non-official. it can lead to bugs because the caller has to check for None
Alex Gaynor
rename this function so it doesn't look like something we copied out of the CPython C-API
Armin Rigo
Change the definition of "_immutable_ = True" to be explicitly required on all subclasses when we put it on a class. Previously, we got this effect implicitly. However, it made an obscure bug that took me three days to locate: app-level subclasses of the immutable built-in types, like 'long', have their fields flagged as immutable too, including the 'storage' from the mapdict, which is nonsense.
Amaury Forgeot d'Arc
Add a repr() to W_SliceObject; for debugging
Branches
fast-forward
Amaury Forgeot d'Arc
cpython issue3004 slightly changed the behavior of slice.indices()
Branches
fast-forward
Benjamin Peterson
remove old review comments
Benjamin Peterson
merge cleanup-obspace-init, in which objspace initialization becomes pretty
Armin Rigo
A generous sprinkle of "_immutable_=True" in the std object space.
Armin Rigo
Translation fix.
Armin Rigo
(antocuni, arigo) Fix an issue shown by (e.g.) test_iterobject.py. The fix is to be as sane as possible in the return value of normalize_simple_slice().
Armin Rigo
(antocuni around, arigo) Tweak to let the annotator prove that start >= 0.
Armin Rigo
(antocuni, arigo) Precise test, and fix, for normalize_simple_slice(). This should fix failing llassert's in pypy-c :-/
Armin Rigo
Just for fun, or maybe to try to win the largest diff award: refactored the StdObjSpace to no longer store the 'space' attribute on any of the W_XxxObject classes. It was not really used in any essential way any more.
Armin Rigo
Hash support: some Wrappables were missing a hash. The main work in this check-in, though, is about making sure the hash_cache field inserted by the rtyper for instances on which hash() is called, only shows up in selected subclasses of W_Root instead of on W_Root. Classes like W_IntObject and W_TupleObject don't need it. (This is a step towards tagged pointers, which has no chance to work if the W_SmallIntObject class contains more than an 'intval' field.)
Carl Friedrich Bolz
changing space.is_true(space.is_ to space.is_w and space.is_true(space.eq to space.eq_w a bit everywhere. Also remove commented out code.
Armin Rigo
Moved slice indices as methods of W_SliceObject, now that they don't belong to slicetype.py any more (they read attributes of W_SliceObjects).
Samuele Pedroni
define indices directly on W_SliceObject
Armin Rigo
Clean up of space.newslice(). Now it always takes wrapped Nones. Moved the logic of __getslice__&co into a space.getslice() operation, which by default does just the sane thing, i.e. space.getitem(space.newslice(...)). The standard object space overrides it to look for the deprecated __getslice__ family of methods.
Christian Tismer
added name prefixes to the _cache/files as far as possible.
Christian Tismer
translated almost all possible code pieces to interp level. reversed the change to applevelinterp in the source files. applevel is now a function that figures out whether it can translate the code or not. All code snippets have been inspected for translatability and marked with NOT_RPYTHON if necessary. Some can be easily enabled, some are hard (using yield)
Christian Tismer
more occurances of appdef replaced by applevel (tested, works fine)
Armin Rigo
slice.__lt__()
Armin Rigo
typo
holger krekel
moved the remaining occurences of "def app_" to applevel/appdef style definitions.
Samuele Pedroni
merged dist-simpler-multimethods branch.
Ludovic Aubry
allow unwrapping of slice object for the purpose of slicing unicode (faked) objects
Adrien Di Mascio
added Slice.eq() operation and hash(Slice) which raises a TypeError added ObjSpace.is_w (shortcut for space.is_true(space.is_(w_obj1, wobj2))) added ObjSpace.eq_w (shortcut for space.is_true(space.eq(w_obj1, wobj2)))
Adrien Di Mascio
added the slice.repr's implementation
Armin Rigo
Moved the branch back into the trunk.
Michael Hudson-Doyle
modernize slices
  1. Prev
  2. 1
  3. 2
  4. Next