Python Iterables struggling using map() built-in

Roy Smith roy at panix.com
Sun Dec 7 19:45:32 EST 2014


In article <mailman.16690.1417998873.18130.python-list at python.org>,
 Chris Angelico <rosuav at gmail.com> wrote:

> > Next problem, what the heck is "res"?  We're not back in the punch-card
> > days.  We don't have to abbreviate variable names to save columns.
> > Variable names are supposed to describe what they hold, and thus help
> > you understand the code.  I have no idea what "res" is supposed to be.
> > Residue?  Result?  Rest_of_items?  Response?  None of these make much
> > sense here, so I'm just left befuddled.
> 
> I take it as "result", which makes plenty of sense to me.

OK, so spell it out.  Three more keystrokes (well, plus another three 
when you use it on the next line).  And one of them is a vowel; they 
don't even cost much.  The next guy who has to read your code will thank 
you for it.



More information about the Python-list mailing list