[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Fri, 14 Apr 2000 21:28:09 +0200


Ken Manheimer <klm@digicool.com> wrote:
> > does anyone that has learned about the LGB rule expect
> > the above to work?
>=20
> Not sure what LGB stands for.  "Local / Global / Built-in"?

certain bestselling python books are known to use this
acronym...

> I'm assuming your hypothetical foo.x means the attribute 'x' of the
> function 'foo' in the global namespace for the function 'foo' - which, =

> conveniently, is the module where foo is defined!

did you run the eff() bot() example?

> I must be misapprehending what you're suggesting - i know you know =
this
> stuff better than i do - but it seems to me that foo.x would work, =
were
> foo to have an x.

sure, it seems to be working.  but not for the right reason.

> (And that foo.x would, in my esteem, be a suboptimal
> way to get at x from within foo, but that's besides the fact.)

fwiw, I'd love to see a good syntax for this.  might even change
my mind...

</F>