Hi all, I have a card class. A card object simply consists of a pair of numbers; 0,0 might be the ace of clubs, for example. I have a toString method in my card class. Is there a way to just say str(card) instead of card.toString()? Maybe some sort of basic, built-in function to override? TIA. Oh, what about doing the same with operators? For example, could I get the program to call my own math functions when it sees a card object in a math expression, like if(card1==card2)
-- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com; http://www.facebook.com/mehgcap _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor