On 5/6/07, tomer filiba <[EMAIL PROTECTED]> wrote:

> 3130 (Access to Current Module/Class/Function)
> ------------------------------------------------
> why make them keywords? they could as well be builtin functions,
> like globals() and locals(). i.e., getmodule(), getclass(), and
> getfunction(). these functions will just climb up the stack frames
> until they find what you're asking for.

Because I couldn't figure out how to do it after compile-time.

> also -- the class object is constructed only AFTER the code
> of the class has finished executing, meaning getclass()
> or __thisclass__ will not work at class level.

Correct, but it would work within methods of the class.  Functions
also don't exist while still being defined, and modules aren't fully
usable while being defined.

-jJ
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to