Re: ABCs, functions, and __call__ (Python3)

2009-01-16 Thread andrew cooke
On Jan 16, 10:13 pm, Christian Heimes wrote: > Any callable in Python 3.0 has a "__call__" attribute. Aha! Thanks! Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: ABCs, functions, and __call__ (Python3)

2009-01-16 Thread Christian Heimes
andrew cooke schrieb: > I think I'm missing something obvious here, so apologies in advance. > > I'd like to be able to test whether something is a function or > implements __call__. Now obviously I can do that as two separate > tests, but I though this was what ABCs were for. However, for the >