It seems that Python 3.1 alpha 1 has been released already. A quick scan of the NEWS file reveals some nice performance improvements in there:
- IO stuff reimplemented in C
- new garbage collector
- faster Unicode handling
- computed gotos (which I’ve never heard of, but apparently offers 20% speedup on supported compilers)
Things like this keep shocking me in python’s release notes though:
- Issue #4707: round(x, n) now returns an integer if x is an integer.
Previously it returned a float.
and from Python 3.0.1’s NEWS:
- Issue #4998: Decimal no longer subclasses from or is registered to
numbers.Real. Instead, it is registered to numbers.Number so that
isinstance(d, Number) will work.
In a release of the C standard library or something, changes like that would mean API and ABI breakage. With python’s flexible typing, it’s not so much of an issue, I guess. Still, it would be nice if someone had sat down and thought about the math a bit more, and been sure about what was right from the beginning. Working out if Decimals should be Real numbers (or, indeed, if Reals should be Numbers) shouldn’t be this hard, should it?
Hmm. I was sure Java would have gotten this right, but it seems not:
class java.lang.Number
* class java.lang.Double
* class java.lang.Float
* class java.lang.Integer
* class java.lang.Long
So longs aren’t integers, and Floats and Doubles are unrelated, except for being some kind of Number? Oh well. It’s not like math is important in computer science, right?
Anyway. I’m trying to keep track of Python 3.x, but until a lot more libraries are available that run with it, it’s mostly a far off dream. Shame, as I’ve been dying to dump 2.x in favor of the new Unicode stuff
Tags: class hierarchies, FOSS, inheritance, java, python



































