News for hackers. Stuff that matters.
Re:First Impressions of Python from a Java Developer by erikano on Monday November 08, 2010 @01:42PM (#1883428)
> The one pitfall for block indenting in Python is reading online documentation. The block indenting gets screwed up sometimes.

Sometimes, pressing "view source" in the browser and looking at the HTML will reveal what it was supposed to look like.

Re:First Impressions of Python from a Java Developer by Semiapies on Monday November 08, 2010 @01:53PM (#1883477)
Mind, this is not unique to Python. It's a bit more irritating in Python because indentation is significant, but I've seen a lot of unindented samples of other languages with correspondingly reduced readability. For some reason, I've most seen such sloppiness in presenting Javascript code.
Re:First Impressions of Python from a Java Developer by wvenable on Monday November 08, 2010 @02:10PM (#1883546)
Yes, but the reduced readability is an easy fix in that case. You can copy the code into an editor and indent based on the braces or have your editor auto-format the code. Badly formatting code in other languages does not change the meaning of the code as it does in Python.
Re:First Impressions of Python from a Java Developer by Semiapies on Monday November 08, 2010 @02:47PM (#1883703)
I'm not sure what your point is, as I already acknowledged that in the comment you're responding to, while making it clear that my concern was readability of code examples on a web page. Are you going for a cheap "gotcha"?
Re:First Impressions of Python from a Java Developer by wvenable on Monday November 08, 2010 @06:03PM (#1884429)
My point is poor readability of samples in other languages is a really simple fix. I have cut'n'pasted many code samples into editors just to re-intent them for reading. With Python, sadly, it's just not possible to that roboticly.
Re:First Impressions of Python from a Java Developer by notyourwork on Monday November 08, 2010 @01:47PM (#1883454)
I do not think the author was not aware of this, it was more of him digressing.
Re:First Impressions of Python from a Java Developer by rbanffy on Monday November 08, 2010 @05:51PM (#1884389)
I think that being able to fit the whole source on a single page more than compensates for the occasional indentation problem.