extending of adding method?
gherzig at fmed.uba.ar
Tue Aug 28 21:20:23 CEST 2007
Hi all. I have a question about design. The general question would be:
Where is the line beteween extending a class and adding new methods to
And the particular case im involved is:
I have a class (say USERCLASS) who implements a user interface. One of
his methods is called `login'. Later on i got the order of implementing
a `single login', which off course means a single user cant login if a
session is already started for that user. Extending comes to my mind at
first (it works good, actually). But now im thinikng if there some
problem in adding a method to the USERCLASS class named single_login(),
who will take care of applying the rules of single sign on.
Which one you guys will pick up? USERCLASS().single_login() or
Thanks for your oppinions!
More information about the Python-list