GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Code Style - not really good list manipulation example - needs explanation · Issue #1086 · realpython/python-guide Open DescriptionIn the Code Style chapter examples - Short Ways to Manipulate Lists there is an example "Add three to all list members." "bad" for i in range(len(a)): a[i] += 3 "good" a = [i + 3 for i in a] Unfortunately the "bad" and "good" examples do a different things:
Although the "good" code looks cleaner the result could be unwanted for example in case of huge lists or required side-effect of modifying the original list. The code at least needs an explanation. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |