Jamie Willis <jw14896.2...@my.bristol.ac.uk> writes:

> This could be written as:
>
> hello = "hello world              "
> hello .= strip()

−1, “.=” is visually too similar to “=”.

Syntax that is ambiguous at a glance is a cost when reading, and here I
think the cost is great.

> In this slightly contrived example, the programmer saved (a small amount
> of) time when writing the code.

Code is read much more often than it is written; we should optimise for
reading effort, not writing effort.

-- 
 \      “The history of Western science confirms the aphorism that the |
  `\     great menace to progress is not ignorance but the illusion of |
_o__)            knowledge.” —Daniel J. Boorstin, historian, 1914–2004 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to