Python 2.3a1

Yeah, just as soon as I finally download Python 2.2.2, Python 2.3a1 comes out. Geez. I guess I won't worry until 2.3 final, though; I don't have any important applications to test. I'm still running 2.2c1 on my main (Windows) machine, though, hence getting 2.2.2. If 2.3 is coming out soon, I may not even bother, since 2.2c1 is doing me OK.

Anyhow, see the highlights and everything new in 2.3 if you care to. Highlights from the highlights:

  • The bool type
  • bsddb is entirely changed (will this affect Roundup users?)
  • SSL in the Windows installer
  • you can use "foo" in "foobar" instead of -1 == "foobar".find("foo") (or catching a ValueError from "foobar".index("foo"))
  • dicts are easier to use, what with keyword arguments to the constructor and a pop method
  • Optik has become a standard module, optparse, to use instead of getopt

The highlights also point out that, because of sequences now supporting slices ("extended" slices), foo = foo[::-1] is equivalent to foo.reverse(). How do efficiencies compare? I bet foo.reverse() is still better for in-place, but I don't have any numbers about it. If you're not really doing it in place, though, is it better to use foo[::-1] instead of bar = foo; bar.reverse(); bar?

Comments

comment

I just grabbed 2.3a1 today and haven’t completely finished looking through it yet, but I’m particularly excited about the availability of the bool type.

comment

bar = foo; bar.reverse(); bar; in my opinion, is immensely better (because it’s easier to read). :)

I’ve fallen way behind on Python. I don’t have time to do much of it at home anymore, and I can’t use it for any production, delivered, or any such code at work.

We mainly only have Python because so many of us new people requested it. That was well over a year ago for me, so I’ve been out of it…