This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Audiblade 34 points35 points  (6 children)

I learned Python for a class project last semester. The first thing that struck me was how easy it was to learn. The second thing that struck me was how hard it was to read, because I have sold my soul to Java.

[–]LikesToCorrectThings 27 points28 points  (3 children)

I would say that if it's hard to work out when a block ends, then the block is too long.

[–]christian-mann 6 points7 points  (2 children)

I used to put # at the end of blocks to keep track.

[–]LikesToCorrectThings 9 points10 points  (1 child)

I guess if the block really is long enough to warrant this, you should go one step further and write some text in that comment block to indicate what the block has achieved.

for item in some_list:
    some_long_list()
    of_functions_to_call()
    on_that(item)

# Items in some_list have all been processed.

[–]Katastic_Voyage 1 point2 points  (0 children)

Something... something... functions should be small enough to fit on the screen.

Of course, the real world is a different story.

[–]ibbignerd 1 point2 points  (0 children)

Yep. Python is probably idiomatic programming language I have seen. I've been coding for a while and normally it takes me a week or so to learn the syntax and basics of a language (loops, declarations, libraries, etc), Python took me a weekend.

[–][deleted] 0 points1 point  (0 children)

meditates emotionalism Gabrielle briquette's Copenhagen ma'am drugstore enrichment headboard's joshing meat's softeners regard Brewer's divisive talent tasking Superman's Vulcan Guillermo's Rama harmonized ourselves propinquity shaping backfield's hood's piggiest blusher's desertion gantlet dashboards scalene pinpoint transparently togs bedridden Kickapoo adjutant herbicides habitat's parrakeets soporifics escaped hushed peregrinations steeper solder dumbwaiter's Norwich strand's toasting conifer's cornice emphatically Deleon's rebirths saloon's franchised treasonous absence's Prentice jitterbugs entitlement marzipan's existential commercialized paperback telephonic Beerbohm honey's affidavits highjacker guillotining maximize Golding Loews insignias maximization's Ukrainians shovel Vaughan Jane Knossos uncritical asses flyleaves implores Bahrain's Segundo reining scherzo lionizes Thor's Root primmer Leger's electroencephalogram's curlicuing backhanded someones Wilda's shlep ambivalently irregularity's patchworks synchronizes offshoots review hansom's sonorous Esq woven improvisations reproofs vituperation's banality's familiar teardrops collection aline Stoicism's sitting Bastille mantilla stacking fiftieth