In article <16278.34154.245725.959203 at montanaro.dyndns.org>, Skip Montanaro <skip at pobox.com> wrote: [ re a long expression of mine ] ... > pos2d = dict([(s,(positions[s][0]+dx*positions[s][2], > positions[s][1]+dy*positions[s][2])) > for s in positions]) ... > pos2d = {s: (positions[s][0]+dx*positions[s][2], > positions[s][1]+dy*positions[s][2]) > for s in positions} > > The extra characters required today are less of a problem if the expression > is laid out sensibly. I have to admit, your indentation is better than mine, even if you ignore the problems caused by my using lines wider than 80 characters. But I still feel the second of your two alternatives more clearly expresses the intent of the expression. -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4