[Newbie] design question

idaku2 at gmail.com idaku2 at gmail.com
Sat May 12 14:03:01 EDT 2007


Hi all

Suppose I have class ShoppingCart which has one method called buy(),
and class Buyer who has one reference to ShoppingCart...  Can I also
have method buy() in class Buyer, which will then called
ShoppingCard.buy(), and also do some other stuff?  Is this legal
design pattern, have methods with same name?

Thanks in advance.




More information about the Python-list mailing list