From: Dominik Bathon Date: 2006-03-09T13:14:00+09:00 Subject: Re: Having a block executed in the context of an instance On Thu, 09 Mar 2006 03:58:07 +0100, wrote: > On Thu, 9 Mar 2006, Logan Capaldo wrote: > >> Hmmmmmm, It's shorter than self.attr, but on the other hand it's >> uglier IMO. One question I would have to wonder is: >> >> self.method( ) # definitely not private >> method( ) # definitely private >> self.x = y # could be public or private >> .x # probably(?) not private ??? >> .x = y # ??? >> >> Oh wait I take the whole thing back, naked method( ) could be public >> too. I guess throwing .x in there doesn't make the visibility any more >> confusing > > I wonder how the parser would handle: > > obj .x > > i.e., whether it would be: > > obj.x > > or > > obj(.x) I would say it should be obj.x, as I didn't propose to allow .meth as a general shortcut for self.meth, but only when it is a left hand side of an asignment. But this leads to: meth .attr=42 I would say that would also be meth.attr=42 and not meth(.attr=42). If you want the latter, then use brackets. Dominik