odd difference calling function from class or instance variable

GregS not at my.real.address.com
Wed Aug 13 06:20:30 EDT 2014


Thanks to both of you for your incredibly prompt replies.  My homework 
for tonight is to digest the descriptor protocol...

Peter, thanks for suggesting using staticmethod() to get the behaviour 
I was expecting.  I've only used staticmethod as a decorator before now.

Chris, I agree that it's not every day you assign functions to class 
attributes, but it does have its uses (I won't bore you with mine).  
Now that I know how it treads on the toes of Python's method magic, I 
can decide whether it's the best approach or not.

Thanks again,

Greg






More information about the Python-list mailing list