<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Aug 25, 2008 at 12:45 AM, Bruce Leban <span dir="ltr"><<a href="mailto:bruce@leapyear.org" target="_blank">bruce@leapyear.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Jim Jewett wrote:<br><div class="gmail_quote"><div><br>If I could write:<br><br> class foo:<br> def self.bar():<br> self.rebar(self.babar)<br><br>then the call to object.bar() would match the declaration. <br>
<br>Back to Russ's proposal: it would be better accomodated IMHO by allowing $ as a character in a variable name, just like _ is. Then, conventionally, people could use $ as self:<br>
<br> def $.bar():<br> $.rebar($.babar)<br><br>and for whatever it's worth, I find $.bar easier to read then $bar as the explicit dot reminds me it's doing an attribute get rather than looking like a special variable name.<br>
</div></div></div></blockquote><br> def $.bar():<br> $.rebar($.babar)<br></div><br>That's two separate proposals, but I think I like both of them.<br><br>Of course, Python already allows "S", which is very similar to "$", as the first argument, so we're almost there on that aspect of it. Come to think of it, I may start using "S" and see how it works out.<br>
<br>So how about<br><br> def S.bar():<br> S.rebar(S.babar)<br><br>--Russ<br><br>
</div>