[EMAIL PROTECTED] wrote:
> It's less explicit than self. but it's shorter, this improves typing,
> and allows to produce more compact code:
>
> return "".join(["Graph(", repr($o), ", ", repr($nodeData), ")"])
>
> Instead of:
>
> return "".join(["Graph(", repr(self.o), ", ", repr(self.nodeData),
> ")"])
It also creates a special case. Object attributes are generally accessed as
obj.foo, while $foo only works from within obj. There are more tradeoffs
involved than just compactness and syntax gestalt.
If compactness is all you want, shorten self to s. Personally I like 'me'
as it's both shorter and more vernacular:
def do_GET (me):
me.send_response (200, "ok")
As an added bonus, you get to channel Cookie Monster when you program. :)
c = Cookie ("good enough") # for me
--
http://mail.python.org/mailman/listinfo/python-list