Inheriting the @ sign from Ruby

Mikael Olofsson mikael at isy.liu.se
Tue Dec 12 11:17:46 EST 2000


On 12-Dec-00 Roy Katz wrote:
 >  shorthand??

If you want a shorthand, why not just do

    Class X:
        def __init__( I, c ): 
            I.c = c

It is substantially shorter than self. and myself., and only one 
character longer than your @-expression, with the advantage that 
you can use it at once without any changes to Python itself.

And-I-think-that- at var-is-ugly-ly y'rs

/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    12-Dec-00
Time:    17:11:13

         /"\
         \ /     ASCII Ribbon Campaign
          X      Against HTML Mail
         / \

This message was sent by XF-Mail.
-----------------------------------------------------------------------



More information about the Python-list mailing list