[Python-ideas] Inline assignments using "given" clauses
Guido van Rossum
guido at python.org
Fri May 11 12:33:10 EDT 2018
On Fri, May 11, 2018 at 3:33 AM, Greg Ewing <greg.ewing at canterbury.ac.nz>
wrote:
> Most people's short-term memory is good enough to remember
> that "m" refers to the match object while they read the
> next couple of lines. IMO, using a longer name would serve
> no purpose and would just clutter things up.
Indeed.
A thought just occurred to me. Maybe we need to instigate a cultural shift
where people think about style guides as less dictated by hard-coded rules
that were "passed down from the mountain" and more as derived from research
that we can all understand about usability. A lot more is known about how
human perception and various types of memory and learning work than it was
when the "7 things plus/minus 2" rule was invented (
https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two).
It would be fascinating to imagine a future where language designers could
talk about such topic with as much confidence as they talk about the
efficiency of hash tables.
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180511/808769ad/attachment.html>
More information about the Python-ideas
mailing list