[Tutor] Alias for a class name

Gregor Lingl glingl at aon.at
Thu Jul 13 01:34:14 CEST 2006


Hi everyoen,

say in some module I have defined a class Pen
and I want an alias for the class name, say
Turtle

I can do this:

class Turtle(Pen):
    pass

or simply (after having defined Pen):

Turtle = Pen

Are those two variants different in effect?
Are there pros or cons for one of both
variants?

Regards,
Gregor


More information about the Tutor mailing list