views:

227

answers:

4

I hear that Java's standard library is larger than Python's so I'm curious, what's missing in Python's?

+3  A: 

Python also comes With Batteries Included... The only place where I've felt Python lacking is a good GUI toolkit (no, TK doesn't compare to Swing xD).

fortran
What's wrong with PyGtk?
Matthew
+3  A: 

Python lacks a robust XML implementation (with full XSLT and XPATH support). The Python stdlib has a few decent implementations for working with XML (DOM parser, SAX parser, and a tree builder called ElementTree), but more advanced XML requires a third party library. I've used 4XSLT and now defer to LXML when I need to do some real XML work in Python.

Jason R. Coombs
I would concur with that, and add that in a related note that it's SOAP implementation is not strong. However, there are good third party (free) packages that pick up the slack. And often those end up as part of the standard lib.
zenWeasel
The DOM parser (if you mean [xml.dom.minidom](http://docs.python.org/library/xml.dom.minidom.html)) is not good at all. If you want to parse a document ElementTree is the only decent thing in the standard library.
Ian Bicking
+7  A: 

The one flaw in Python imho is that Python lacks one real canonical method of deployment. (Yes there are good ones out there, but nothing that's really rock solid).

Which can hamper its adoption in some Enterprise environments.

zenWeasel
Packaging and deployment are in dire need of help. There are some with a vision forward -- let's hope they succeed.
Jason R. Coombs
good to know, thanks
Tshepang
+4  A: 

Java provides a lot of varied implementations of interfaces for the basic types. Java has an ArrayList and single-linked-list and double-linked list, whereas Python just has a list. Java includes multiple Map implementations such as TreeMap or LinkedHashMap, whereas Python generally sticks to the single dict implementation. An ordered dictionary was proposed is now part of Python 3.1, but in general, Java has a richer set of collections and base classes.

In defense of Python, however, the need for more rigorously defined base classes and interfaces is much less necessary with the dynamically-typed approach (where interfaces are often accepted implicitly).

Jason R. Coombs
Also don't forget Java's concurrency-aware collections in the java.util.concurrent package.
Esko Luontola
I would say that having just one implementation of the basic collection types is a side effect of supporting them as built-in types with syntax sugar around... Sincerely, I do prefer having just one kind of dictionary and being able to use {} for the constructor than having three or four types and using a more verbose syntax (same for lists).
fortran
There are also languages whose syntax is so flexible, that library types look like if they were built-in types. For example Scala.
Esko Luontola
With the introduction of [Abstract Base Classes](http://docs.python.org/library/abc.html) [many data structures](http://docs.python.org/library/collections.html#abcs-abstract-base-classes) have something similar to a formal interface. Generally Python hasn't added data structures based on algorithm theory, but has tried to make the basic data structures as good as possible and then slowly added more structures for cases where existing structures really don't work, based on the idea that a well-tuned general structure often beats a more specific less-used structure.
Ian Bicking