Standard library. The good news is that Java has libraries for almost anything you can imagine. The bad news is that dynamic languages tend to come with much more useful stuff built in:
- JSON encoding/decoding
- Joining strings
- Command line argument parsing
- CSV file parsing
- Complete HTTP client implementation (multipart POST, cookies, ...)
- Iterators: for loops over iterators, combinations (filter, append, etc.), conversion to collections
- Collection literals: Java 8 will have collection literals, so we will have to wait a while. In the meantime, Arrays.asList() is good enough for lists and a chainable put() (return type = Map) would be good enough for maps.
- Triple-quoted strings: If a string is triple-quoted in Python, it can contain multiple lines of text and single quotes.
- Raw strings: In Python, prefixing a string quote with an 'r' means it is raw and slashes are interpreted as is, and not used for escaping. This is very useful for text that contains backslashes (regular expressions, LaTeX).
- List comprehension: great in Python, easily added to Java, once it has closures.
- Accessing the n-th last element (arrays, strings, lists, ...): In Python, the index -n can be used for this purpose. In Java, you have to resort to mylist.get(mylist.size()-n).
- str() and ref(): Python has two kinds of toString() methods. str() returns a human readable representation, while ref() returns something that can be parsed (i.e. this method serializes to Python source code).
- Keyword arguments, optional arguments: useful, but might be too cumbersome to add to Java.
Most of the other Java warts, I can live with. That Java will have closures sometimes in the future is great, because currently it is difficult to encapsulate a way of iteration, where the operation that is applied to each element can be configured.
- Update 2010-10-25: BiJava: Backwards-incompatible Java
- Update 2010-11-13: Filling the holes of the Java standard library