[Python-Dev] .len() instead of __len__() in Py3.0

Giovanni Bajo rasky at develer.com
Mon Mar 6 16:29:44 CET 2006


Oleg Broytmann <phd at oper.phd.pp.ru> wrote:

>> I just wanted to point out that one of the things I *LOVE* about Python
>> is that the design of name resolution in Python ensures that no
>> programmer need suffer from the size of the builtin namespace. If you
>> never use certain builtins, perhaps "hex" or "super", then go ahead
>> and use those as identifiers in your code. Avoid only that portion of
>> the builtin namespace that you feel is worth keeping.
>
>    Doesn't work. For example, PyChecker/PyLint would report warnings.


... which can be obviously shut down if you are not a newbie and know what
you are doing. I want PyChecker/PyLine to find bugs in my code and help me
enforce *my* personal coding standard. I don't want them to tell me what it
is "generically better" to do. The fact that there is a warning for builtin
shadowing, to be used by people which such a coding standard, doesn't mean
that everybody must agree with it.
-- 
Giovanni Bajo



More information about the Python-Dev mailing list