Attack a sacred Python Cow

Russ P. Russ.Paielli at gmail.com
Sat Jul 26 20:14:46 EDT 2008


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):




More information about the Python-list mailing list