Idea: Python Shorthand (was Re: Why a class when there will only be one instance?

Ville Vainio ville at spammers.com
Thu May 27 11:14:57 EDT 2004


>>>>> "Peter" == Peter Maas <peter.maas at mplusr.de> writes:

    Peter> Ville Vainio wrote:
    >> You might want to create a preprocessor that adds "self" to all
    >> in-class definitions that have @, and convert @hei to self.hei. Voila,
    >> Ruby non-silliness.

    Peter> This is an editor job. Good programming editors allow to
    Peter> expand abbreviations, so there is no need to clutter the
    Peter> language definition or write a preprocessor.

Cluttering the language definition was the furthest thing from my
mind. The point of the preprocessor suggestion was that there is no
need to abandon Python if 'self' is all that troubles you. If one
doesn't bear to look at it, it can be made invisible. Running every
Python script you write through a preprocessor is not a worse solution
that switching to Ruby.

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list