[Python-ideas] Mitigating 'self.' Method Pollution

Ben Finney ben+python at benfinney.id.au
Sat Jul 11 04:20:33 CEST 2015


Steven D'Aprano <steve at pearwood.info> writes:

> Personally, I don't think of "self" as pollution at all. It's nice and
> explicit and helps readability.

+1.

All the complaints that I see about “pollution” or “extra work” or etc.,
seem IME to be accompanied by a dislike of Python's “explicit is better
than implicit” principle.

Since I think that principle is essential to Python's readability and
maintainability, I think that removing explicit ‘self’ would tangibly
*harm* readability and maintainability of Python code.

-- 
 \       “I bet one legend that keeps recurring throughout history, in |
  `\              every culture, is the story of Popeye.” —Jack Handey |
_o__)                                                                  |
Ben Finney



More information about the Python-ideas mailing list