[Python-Dev] dir, part 2 (original) (raw)

tomer filiba tomerfiliba at gmail.com
Tue Nov 7 16:41:53 CET 2006


okay, everything's fixed. i updated the patch and added a small test to: Lib/test/test_builtins.py::test_dir

-tomer

On 11/7/06, Nick Coghlan <ncoghlan at gmail.com> wrote:

tomer filiba wrote: > cool. first time i build the entire interpreter, 'twas fun :) > currently i "retained" support for members and methods, > so it doesn't break anything and is compatible with 2.6. > > i really hope it will be included in 2.6 as today i'm using ugly hacks > in RPyC to make remote objects appear like local ones. > having dir solves all of my problems. > > besides, it makes a lot of sense of define dir for classes that > define getattr. i don't think it should be pushed back to py3k. > > here's the patch: > http://sourceforge.net/tracker/index.php?func=detail&aid=1591665&groupid=5470&atid=305470

As I noted on the tracker, PyObjectDir is a public C API function, so it's behaviour needs to be preserved as well as the behaviour of calling dir() from Python code. So the final form of the patch will likely need to include stronger tests for that section of the API, as well as updating the documentation in various places (the dir and PyObjectDir documentation, obviously, but also the list of magic methods in the language reference). +1 on targeting 2.6, too. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org



More information about the Python-Dev mailing list