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



--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to