[Python-Dev] Object customization

Greg Stein gstein@lyra.org
Fri, 14 Apr 2000 14:23:50 -0700 (PDT)


On Fri, 14 Apr 2000, Barry A. Warsaw wrote:
> >>>>> "FL" == Fredrik Lundh <effbot@telia.com> writes:
> 
>     FL> fwiw, I'd love to see a good syntax for this.  might even
>     FL> change my mind...
> 
> def foo(x):
>     self.x = x
> 
> ? <ducking>  :)

Hehe... actually, I'd take Skip's "_.x = x" over the above suggestion. The
above syntax creates too much of an expectation to look for "self". There
would, of course, be problems that self.x doesn't work in a method while
_.x could.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/