Ray wrote:
Ville Vainio wrote:

Regarding a Java programmer moving to Python, a lot of the mindset
change is about the abundant use of built in data types of Python. So
a Java programmer, when confronted with a problem, should think "how
can I solve this using lists, dicts and tuples?" (and perhaps also my
new favourite, sets). Class-based solution should be chosen only

after

seeing that the problem can't be trivially solved with built-in

types.

Hmmm, but isn't it the same as a Java programmer who's familiar with
the Collection Framework? (Which has list, dict (map), and set)?

Python collections are vastly easier to work with. In particular for creating, iterating and nesting collections there is really no comparison between Python and Java. As a result, my Python programs use collections much more than Java programs.


To respond to the OP, I recommend the book "Python Cookbook" as a way to learn the Pythonic view. It doesn't contrast Python with Java, but it gives many examples of idiomatic Python

Kent
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to