Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python 3000 Alpha 1 Released (python.org)
26 points by mattculbreth on Aug 31, 2007 | hide | past | favorite | 25 comments


I liked this overview by Guido on Python 3000. I like the changes http://www.artima.com/weblogs/viewpost.jsp?thread=208549


The thing that I admire the most about this is how small a change Py3K really is, considering it's the first major compatibility breaking release AFAIK. The change from 1.x to 2.x version numbers was for historical and cosmetic reasons: if you wrote a module in Python 1.5 there's a very good chance you can run it in Python 2.5 with only trivial modifications at worst (e.g., one of your identifiers has become a keyword). This is a testament to the excellent taste of the Python designers, and to their rare mix of restraint and practicality.


The print(x) instead of print x thing is going to kill me in interactive sessions. I can feel it now. It's those little things that get ingrained in your daily work that are hard to break.


I made this http://defcraft.org/hacks/pycmds/pii.py to help define "commands" in the interactive interpreter. Commands like "ls" and "h os".

"ls" is a simple command -- invokes the Unix command "ls -l". A more complicated one: "h os" -- run help on the os module (just like "help(os)"). This is kinda tricky because "h os" is actually a syntax error in Python. When interactive, I catch syntax errors and see if they are user defined commands, in which case I execute the desired command. This works for Python 2.5, but shouldn't be too hard to port to Python 3.0.

I briefly looked at IPython, but that seemed to complicated for my needs.

(Also, http://defcraft.org/hacks/pycmds/strftime_helper.py uses the above file to help the user with strftime spec usage. I can never remember all the special characters.)


Nice!

We use similar technic with hpy - you type in Hebrew Python http://nirs.freeshell.org/code/hpy/ , then each line is translated to Python and executed.

How do create more fancy links here?


I guess this will cause ANOTHER Reddit rewrite.


Nah, they'll rewrite it in Erlang next. ;-)


Watch the synde comments while Erlang fans are around :-)


You only think I'm joking. http://spez.name/ ;-)

(Disclaimer: I have no inside information about Reddit or its future plans. I really wouldn't be terribly surprised if they did rewrite it in Erlang, though.)


LOL ... If they did I might actually go there ... forget that I might try to get a job there ... no forget that too ... I'll just make my Erlang project good enough to buy his :-)


"... Nah, they'll rewrite it in Erlang next. ;-) ..."

Nah Lisp. Oops I forget they already have that language covered.


"... I guess this will cause ANOTHER Reddit rewrite. ..."

Interesting perspective I found on Coding Horror suggesting that it wasn't so much a language change as a change of platforms ~ http://www.codinghorror.com/blog/archives/000839.html


> We're switching to a model known from Java: (immutable) text strings are Unicode, and binary data is represented by a separate mutable "bytes" data type.

Tcl had that something like 5 years ago. Of course, that's one of the reasons it's slower...


Sheesh.. Emotions are running hot in this thread.


If only it was as fast as Ruby.


If only Ruby had built in Unicode support


Why is Python still interesting? Just use Scala.


Please don't feed the troll.

If you want to start a language war, why don't you just make a new post rather than hijacking this one? In a post about Python 3000 I was expecting debate about Py3 vs Py2, not about Python in general vs other languages.


I don't see the equivalence. Some people don't want to the bloat of the JVM, nor the bloat of Java libraries themselves. Some people prefer dynamic typing over static typing (and yes, I know Scala is type-inferred). Some people love Python's libraries and/or community.

It isn't clear to me why Scala is obviously better than Python as you imply.


Why do you care about the bloat of the JVM? Memory is cheap.

The Java libraries are rather extensive. I would rather have too much than too little.

Static typing is a big win, particularly if you don't have to declare everything (Scala has local type inference).

Sure, there are lots of bright people using Python. But Scala is a better language and has bright users also.

If you are unfamiliar with Scala, take a look at this:

http://www.scala-lang.org/docu/files/ScalaByExample.pdf


It is as if someone took all the things that are gross about Java, CAML, and Smalltalk, and combined them into a single language.


Have you tried Scala?


Well the two aren't exactly apples and apples. Why do you prefer Scala over Python?


I have no clue either...fill us in.


For those who thought that this comment was feeding a troll. You assumed too much.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: