Guido's new method definition idea

Lie Lie.1296 at gmail.com
Sun Dec 7 01:17:12 EST 2008


On Dec 7, 1:02 am, News123 <news... at free.fr> wrote:
> What would be interesting would be some syntactical sugar to get rid of
> the 'self' (at least in the code body).
>
> example:
> class C:
>     class_elements a,b,c,d
>
>     def method(self,arg):
>         global d
>         a,b,c = arg[0..3]
>         d = a + b
>         self.e = a + d
>

Nah, that would make it not explicit. Explicit here also means that to
refer to self's a, we need to explicitly refer to self.



More information about the Python-list mailing list