Bruno Desthuilliers wrote:
class CommandMenuSelectionCallback:
    def __init__(self, key):
        self.key = key

    def __call__(self):
        print self.key


Looks like Java.

When was the last time you used Java? It has no support for using classes as callable objects. __call__ would have to be invoked manually; you definitely couldn't have a CommandMenuSelectionCallback instance masquerading as a function as this code (basically) does.


STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to