I'm all for descriptive names, but there's a great deal of benefit to
knowing when a descriptive name will help, and when all you need is a
variable which will be quickly recognized.

Compare:
[theValueInTheList.func() forTheValueInTheList in theList]
[x.func() for x in list]

One of these is much, much, easier to read than the other.  It's
not the one that used a "descriptive" name.

-s

You did not use descriptive names in your example, but verbose names. That makes a huge difference.

[ str(day) for day in week ]
[ str(x) for x in _list]
[ str(d) for d in w ]

I let you decide which one is better. After that I'm running out of arguments :o)

Note that I did not suggest to write
[ aDayInAWeek.displaymeCauseImAwesome() for aDayInAWeek in weekContainingSomeDaysHopefully ]

Cheers,

JM
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to