Guido's new method definition idea

anthony.tolle at gmail.com anthony.tolle at gmail.com
Mon Dec 8 12:09:30 EST 2008


On Dec 8, 12:01 pm, anthony.to... at gmail.com wrote:
>
> It would be nice to be able to do the following instead:
>
> class C:
>     def createfunc(self):
>         def self.func(arg):
>             return arg + 1
>

The above example should have read as follows:

class C:
    def createfunc(self, arg):
        def self.func(arg):
            return arg + 1

-----

Anthony Tolle



More information about the Python-list mailing list