pdpinch
  • pdpinch
Are list comprehensions in Python worth the effort? They seem like fun brainteasers, but once I write the code down it looks illegible to me -- even it works. It reminds me of some of the unmaintainable code I wrote in Perl years ago.
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
That's why the "comment" statement was invented. Just because the code works doesn't mean your job is done. Arcane coding should also include some explanatory comments to help out the next programmer to come along (which might be yourself in 6 months).
anonymous
  • anonymous
Aye, you can use comments to explain it. List comprehensions save a whole lot of space and speed, ideal for some very complex programming.
andrew.m.higgs
  • andrew.m.higgs
Perl code, unmaintainable?? :-)

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I never found Perl unmaintainable. In fact, after a bit of effort, it became easy to read and I always had to remind myself that others were not coming in with the same background. Thus, its still a good habit to comment and document techniques which might be tricky or just out of the ordinary.
andrew.m.higgs
  • andrew.m.higgs
Yeah. Like regular expressions....:-)

Looking for something else?

Not the answer you are looking for? Search for more explanations.