15,906 reputation
3276
bio website demianbrecht.github.com
location
age 37
visits member for 4 years
seen Apr 1 at 16:05

I've been spending over the last decade of my life building games.

I have a deeply seeded love of Python and the open source community as a whole.

Me elsewhere:


Nov
30
awarded  Good Answer
Sep
30
awarded  Notable Question
Jul
28
awarded  Enlightened
Jul
24
comment Opposite term of indent
@RobvanderVeer: This conversation moved on nearly two years ago ;)
Jul
9
awarded  Nice Answer
May
8
awarded  Enlightened
May
1
awarded  Nice Answer
Apr
26
awarded  Yearling
Mar
29
awarded  Nice Answer
Mar
22
revised Python code style - blank lines in long list
deleted 762 characters in body
Mar
22
comment Python code style - blank lines in long list
@Izkata: Code should be self-documenting. In grouping them, it's more obvious from a code standpoint. You can also reorder trivially now (not that you'd need to in this particular context) based on reference rather than cut/pasting blocks of code. /Also/, if the accelerator list becomes long, segregating them /absolutely/ increases readability.
Mar
22
comment Python code style - blank lines in long list
@Izkata: How, exactly, is segregating various accelerators into logical groups increasing readability and increasing complexity?! Sure, using chain rather than simple concat is more complex, but I've stated reasons for doing so above (preferring + when called for).
Mar
22
comment Python code style - blank lines in long list
See my update. I wasn't thinking overly clearly when I originally answered.
Mar
22
comment Python code style - blank lines in long list
Would love to know the reason for the downvote :P
Mar
22
comment Python code style - blank lines in long list
No reason in particular as they achieve the same result. Using chain, you could do something like accelerators = [accel_file, accel_project, ...] and then feed it into chain(*accelerators). But yes, if you're not doing something like that, then simple concat using + would be the way to go (I was working with chain when I wrote the above ;))
Mar
22
comment Python code style - blank lines in long list
@ChrisKrycho: See edit. Really, it's just personal preference, but this makes the intention of each portion of your list easier to grok. It's /clear/ what is intended to go where (and therefore increases readability).
Mar
22
revised Python code style - blank lines in long list
added 278 characters in body
Mar
22
comment Python code style - blank lines in long list
@ChrisKrycho: Ah, in my un-caffeinated state, I didn't see fully what was going on. Rather than using a class, I'd still set a local reference to each logical block and then chain them to create the list being fed into AcceleratorTable.
Mar
22
answered Python code style - blank lines in long list
Mar
21
answered Web developer to software engineer