FEEDBACK WANTED: Type/class unification

William Tanksley wtanksle at dolphin.openprojects.net
Wed Aug 1 22:37:50 CEST 2001


On Wed, 1 Aug 2001 14:30:29 -0500, Skip Montanaro wrote:
>I just noticed this thread.  Perhaps it's already been suggested, but I
>think Python's parser could easily be modified to recognize "class" as the
>first parameter in a method function's argument list.  There has been talk
>in python-dev off-and-on about relaxing Python's keywords-can't-be-names
>rules.  This might be a good time to revisit it.

I like the idea of recognising 'class' as an indicator of a class method;
I don't like the idea of using 'class' as the enforced name for the first
parameter.

def fun(class self, whatever):
seems reasonable, but
def fun(class, whatever):
doesn't.

Oops, I just realised that using 'class' as a variable name can't possibly
work: the parser can't currently disambiguate

class = myClass

from a class declaration, since both start with the token "class".

>Skip

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list