I don't like the OO part of python. In particular the "self" keyword everywhere.

Chris Angelico rosuav at gmail.com
Thu Jun 11 07:38:06 EDT 2015


On Thu, Jun 11, 2015 at 9:27 PM, Skybuck Flying <skybuck2000 at hotmail.com> wrote:
> If I wanted to access a global variable I would use the existing "global"
> thing
>
> global SomeField...
>
> maybe if I wanted to use a local variable for routine:
>
> local SomeField...
>
> seems nicer... then having to use self everywhere...

Oops, missent.

If you want this, how about simply declaring all function-local
variables, and having everything else be implicitly global? Or declare
(with data type) all globals, all class attributes, and all locals,
and then let the compiler figure out what you want? Because if you
want ECMAScript or C++, you know where to find them.

ChrisA



More information about the Python-list mailing list