[Python-3000] [Python-Dev] PEP 30xx: Access to Module/Class/Function Currently Being Defined (this)
Steven Bethard
steven.bethard at gmail.com
Mon Apr 23 05:34:54 CEST 2007
On 4/22/07, Jim Jewett <jimjjewett at gmail.com> wrote:
> PEP: 30XX
> Title: Access to Module/Class/Function Currently Being Defined (this)
[snip]
>
> Abstract
>
> It is common to need a reference to the current module, class,
> or function, but there is currently no entirely correct way to
> do this. This PEP proposes adding the keywords __module__,
> __class__, and __function__.
+1 on the general idea, if it can be implemented. ;-)
One thing that isn't clear... You're saying "keywords". So that means
"__module__" would not be a normal attribute looked up on in the
globals or builtins, but instead would be associated with its own
op-code?
STeVe
--
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-3000
mailing list