[Tutor] Problem with calling class methods stored in a list
Steven D'Aprano
steve at pearwood.info
Thu Jan 10 23:55:53 CET 2013
On 10/01/13 23:57, eryksun wrote:
> On Thu, Jan 10, 2013 at 7:11 AM, Steven D'Aprano<steve at pearwood.info> wrote:
>>
>> So, inside the foo() method, do this:
>>
>> @classmethod
>> def foo(cls):
>> cls.method_list[0].__get__(cls, None)()
>
> That should be
>
> cls.method_list[0].__get__(None, cls)()
Oops, yes, thanks for the correction.
--
Steven
More information about the Tutor
mailing list