Linked by Thom Holwerda on Thu 9th Oct 2008 21:04 UTC, submitted by ganges master
General Development Python 2.6 has been released on October 1st. The major theme of this release is preparing the migration path to Python 3.0, a major redesign of the language. Whenever possible, Python 2.6 incorporates new features and syntax from 3.0 while remaining compatible with existing code by not removing older features or syntax. See the what's new docs for more details.
Thread beginning with comment 333106
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Yeah, greate
by unavowed on Fri 10th Oct 2008 08:59 UTC in reply to "RE: Yeah, greate"
unavowed
Member since:
2006-03-23

Except that if you want to keep your code width limited to, say, 80 columns, then in many cases you are forced to use backslashes at the end of a line to inform python that you intend to continue it in the next. I personally prefer braces or "end" keywords over having to do this manual dance, which sometimes makes me feel I'm writing for the C preprocessor.

Example:
$ cd /usr/share/blender/scripts && grep '\\$' *.py | wc -l
938

Edited 2008-10-10 09:02 UTC

Reply Parent Score: 2

RE[3]: Yeah, greate
by CrLf on Fri 10th Oct 2008 18:44 in reply to "RE[2]: Yeah, greate"
CrLf Member since:
2006-01-03

Limiting code to 80 columns in this day and age is just ridiculous. There's nobody out there still programming at the console (an 80x25 console at least), and everybody else just uses more than 80 columns with no problems.

You may say long lines make code more difficult to read, but if you limit yourself to lines with at most 80 characters (excluding leading whitespace), you won't that that big of a need to break statements into multiple lines.

But forgetting that, most statements that can become longish can also be broken in multiple lines without backslashes (argument lists, conditional statements, ...). Every statement that requires something more can have that something more on another line without using backslashes.

Actually right now I can't see anything that can't be broken, other than strings... (eg: print "some" \ "string")

Reply Parent Score: 3

RE[4]: Yeah, greate
by alopecoid on Sat 11th Oct 2008 05:07 in reply to "RE[3]: Yeah, greate"
alopecoid Member since:
2005-07-07

Limiting code to 80 columns in this day and age is just ridiculous. There's nobody out there still programming at the console (an 80x25 console at least), and everybody else just uses more than 80 columns with no problems.


You would actually be surprised just how many people are still doing this. I'm surrounded by them. And, yeah, I think it's borderline ridiculous.

Reply Parent Score: 1