Attack a sacred Python Cow

Colin J. Williams cjw at ncf.ca
Sun Jul 27 22:04:43 CEST 2008


Russ P. wrote:
> On Jul 26, 2:25 pm, Terry Reedy
>> There is a lot of code you have not seen.  Really.  In informal code I
>> use 's' and 'o' for 'self' and 'other'.  I don't usually post such
>> because it is not considered polite.  So you have seen a biased sample
>> of the universe.
> 
> You take the name down to a single letter. As I suggested in an
> earlier post on this thread, why not take it down to zero letters? You
> could if Python accepted something like
> 
> class Whatever:
> 
>     def fun( , cat):
> 
>         .cat = cat
> 
> This is even better than the single-character name, not only because
> it is shorter, but also because there is no question that you are
> referring to "self." No need to look back at the method signature to
> verify that.
> 
> For those who don't like the way the empty first argument looks, maybe
> something like this could be allowed:
> 
>     def fun( ., cat):
> 
I don't see the need for the comma in fun.

Colin W.



More information about the Python-list mailing list