[Python-3000-checkins] r54286 - python/branches/p3yk/Objects/object.c

2007-03-12 Thread georg.brandl
Author: georg.brandl Date: Mon Mar 12 14:15:14 2007 New Revision: 54286 Modified: python/branches/p3yk/Objects/object.c Log: Check the keys of the locals dict -- they need not be a list. Modified: python/branches/p3yk/Objects/object.c ==

Re: [Python-3000-checkins] r54265 - in python/branches/p3yk: Doc/lib/libfuncs.tex Lib/test/test_builtin.py Misc/NEWS Objects/object.c Python/bltinmodule.c

2007-03-12 Thread Neal Norwitz
I assume this is not the desired behaviour? >>> class F: ... def __dir__(self): ... return [5] ... >>> dir(F()) [5] >>> f = F() >>> dir(f) [5] >>> def __dir__(): return [10] ... >>> f.__dir__ = __dir__ >>> dir(f) [5] I think the problem is in _dir_object() + PyObject * dirfunc = PyOb

Re: [Python-3000-checkins] r54265 - in python/branches/p3yk: Doc/lib/libfuncs.tex Lib/test/test_builtin.py Misc/NEWS Objects/object.c Python/bltinmodule.c

2007-03-12 Thread Neal Norwitz
Whoops, pulled the trigger too soon. I also wanted to point out that in the example below__dir__() is returning non-strings. Is that ok, even though attributes must be strings? n -- On 3/12/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: > I assume this is not the desired behaviour? > > >>> class F

Re: [Python-3000-checkins] r54265 - in python/branches/p3yk: Doc/lib/libfuncs.tex Lib/test/test_builtin.py Misc/NEWS Objects/object.c Python/bltinmodule.c

2007-03-12 Thread Georg Brandl
Neal Norwitz schrieb: > I assume this is not the desired behaviour? > class F: > ... def __dir__(self): > ... return [5] > ... dir(F()) > [5] f = F() dir(f) > [5] def __dir__(): return [10] > ... f.__dir__ = __dir__ dir(f) > [5] > > I think the problem is