Source

pypy / pypy / module / __builtin__ / app_inspect.py

Author Commit Message Labels Comments Date
Armin Rigo
Intermediate check-in
Branches
kill-geninterp
Benjamin Peterson
fix __dir__ on old-style classes
Benjamin Peterson
lookup __dir__ correctly
Benjamin Peterson
__dir__() on anything should override the default behavior
Amaury Forgeot d'Arc
issue686 (nekto0n) Fix dir() on objects with a broken __getattribute__
Armin Rigo
(fijal, arigo) Forgot to sort() the result of dir().
Armin Rigo
(fijal, arigo) Support for __dir__().
Amaury Forgeot d'Arc
dir() is supposed to fail on broken modules with invalid __dict__
Branches
fast-forward
Armin Rigo
Move hasattr() to interp-level. It's not really longer (it's shorter actually :-) and it allows proper handling of the UnicodeEncodeError that we get if the attribute name is a non-ASCII unicode string...
Alexander Schremmer
Rewrote isinstance and issubclass in RPython, gives 25% speed boost. Things to check: why is it still 10 times slower than CPython? How do the space method isinstance etc. relate to this code?
Armin Rigo
hasattr() must raise TypeError if the 2nd arg is not a string or unicode.
Armin Rigo
Eat almost all exceptions in hasattr(), not just AttributeError. This is a debatable feature of CPython, but our own translation toolsuite relies on it occasionally, e.g. by doing hasattr(random_object, '__name__') which sometimes gives a TypeError.
Armin Rigo
Added docstrings to __builtin__ functions.
Armin Rigo
Another corner case and fix for CPython's test_builtin.
Armin Rigo
Testing, quick fix.
Armin Rigo
No need to import __builtin__; it's our current builtins here.
holger krekel
issue51 testing this got finally sensible after Chris's recent checkins: - renamed sys2 to sys - renamed builtin to __builtin__ - put a README into pypy/module warning against putting .py files in there - fixed all the references to sys2 and modules (i hope)