how to tell a method is classmethod or static method or instance method

Nathan Rice nathan.alexander.rice at
Wed Feb 15 13:31:44 EST 2012

> And I'll take this opportunity to plug my dualmethod descriptor:

I use an analogous pattern in SQL Alchemy all the time (it's called
hybridmethod/hybridproperty there).

+1 to dualmethod, that pattern is great when you want a method or
property that does something concrete when passed an instance, or
something abstract relating to all instances when passed a class.


More information about the Python-list mailing list