News for hackers. Stuff that matters.
Re:Curing Python's Neglect by pmjordan on Friday May 29, 2009 @05:46PM (#632878)
Complaints around infelicities in the Python stdlib are fair enough - I don't think anyone would defend them, but what can you do? You can't change published APIs.

I was under the impression that Python 3 broke a lot of backwards compatibility, so could they not introduce new APIs with that? Or is that in fact what they did, and Zed is just complaining about 2.x?

I apologise if I'm mistaken on this, I've hardly used python at all. (though I keep meaning to learn it so I can finally stop writing bash scripts)

Re:Curing Python's Neglect by csbrooks on Friday May 29, 2009 @06:26PM (#632943)
I apologise if I'm mistaken on this, I've hardly used python at all. (though I keep meaning to learn it so I can finally stop writing bash scripts)

Get crackin'. It's a breeze to learn, and you'll be writing more robust scripts than in bash in no time.

Re:Curing Python's Neglect by jmillikin on Friday May 29, 2009 @06:56PM (#633005)
Python 3 removed old, deprecated APIs, but did not change any existing APIs. Probably the most extreme re-organization was the urllib/urllib2 merger, which was at its core just removing old stuff. Because Python is dynamically typed, the "protocol" of a library is extremely important, and the semantics of existing functions/classes are almost never changed.

Of Zed's complaints, I feel that two are misguided (time handling seems quite reasonable to me, and I've never seen an easier documentation system than Sphinx).

I think applying the "del" keyword to objects in a container is a mistake in the language, but that's how it was designed, so it probably wouldn't have been changed in the 2 -> 3 transition. It certainly won't be changed now -- the best that can be hoped for is for its use to be discouraged in the documentation.

Install/Uninstall of modules is fairly easy, but requires all concerned parties to work together. Otherwise you end up with half-installed, broken modules. There are PEPs in progress to work on this, but it's a social/political problem rather than a technical one.

Python's file-manipulation APIs are an ongoing calamity.

Re:Curing Python's Neglect by llimllib on Saturday May 30, 2009 @12:59PM (#633844)
> Python 3 removed old, deprecated APIs, but did not change any existing APIs.

This is simply false. Modules were added, renamed, and modified. Module names now conform to pep 8 (Queue -> queue, SocketServer -> socketserver, etc). cPickle, cProfile and cStringIO are now accessible through their non-c counterparts instead of individually. Packages have been grouped - for example the http libraries are now in http.* instead of the top level.

Examples of API changes include the removal of sys.maxint and sys.exitfunc and friends, many libraries returning unicode strings instead of byte strings by default, and lots lots more.

Consult the "What's new in python 3.0" for a high-level overview: http://docs.python.org/3.0/whatsnew/3.0.html#library-changes

Re:Curing Python's Neglect by jmillikin on Saturday May 30, 2009 @01:10PM (#633856)
Do you have any examples of where the behavior of a library function/method was changed, without renaming that method? The only examples I can think of are the change to return lazy iterables from map(), filter(), etc, which won't affect most use cases.
Re:Curing Python's Neglect by llimllib on Saturday May 30, 2009 @01:43PM (#633893)
"os.listdir() returns a list of bytes instances if the argument is a bytes instance" and unicode otherwise.