[Python-Dev] nonstandard behavior of reflected functions (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Oct 19 03:15:38 CEST 2009
- Previous message: [Python-Dev] nonstandard behavior of reflected functions
- Next message: [Python-Dev] SIGCHECK() in longobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ehsan Amiri wrote:
I see the same behaviour, moreover when I change class Quantity to a classic class (removing '(object)'), it works as expected. (i.e. Quanitity.add() is called after the fourth print. I run Python 2.6.2 on Vista.
Darren found the explanation further down the page he was reading - the fact that the right operand is an instance of a subclass of the left operand's class makes a difference.
Regards, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] nonstandard behavior of reflected functions
- Next message: [Python-Dev] SIGCHECK() in longobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]