Make staticmethod objects callable?
Nicolas Fleury
nid_oizo at yahoo.com_remove_the_
Tue Feb 28 15:17:36 EST 2006
Hi everyone,
I was wondering if it would make sense to make staticmethod objects
callable, so that the following code would work:
class A:
@staticmethod
def foo(): pass
bar = foo()
I understand staticmethod objects don't need to implement __call__ for
their other use cases, but would it still make sense to implement
__call__ for that specific use case? Would it be error-prone in any way?
Thx and regards,
Nicolas
More information about the Python-list
mailing list