This link has been bookmarked by 50 people . It was first bookmarked on 09 Jul 2006, by craig hancock.
-
-
A static method in Java does not translate to a Python classmethod. Oh sure, it results in more or less the same effect, but the goal of a classmethod is actually to do something that's usually not even possible in Java (like inheriting a non-default constructor). The idiomatic translation of a Java static method is usually a module-level function, not a classmethod or staticmethod. (And static final fields should translate to module-level constants.)
-
-
-
But in Python, more often than not, code is easier to write than XML
-
Python objects are not Java beans. Do not write getters and setters. This is what the 'property' built-in is for
-
-
Chris LasherTransitioning to Python? Here are some tips and pitfalls to avoid. Even if you're not a Java (or C++) programmer this has some good tips.
-
-
And static final fields should translate to module-level constants.
-
Python translation is a hash table
- 2 more annotations...
-
-
JingleMan Sweepquite interesting
-
Ralph Youngby Phillip J. Eby
-
Jerry Wongdifference between python and java.
-
Heinz Wittenbrink"This is only the tip of the iceberg for Java->Python mindset migration, and about all I can get into right now without delving into an application's specifics."
-
-
Or, if you have a thick skin and don't mind being laughed at, try explaining to a Lisp programmer why your application needs XML!
-
-
dbrichardsonpython java xml comparison
-
-
Python Is Not Java
-
Python Is Not Java
- 1 more annotations...
-
-
-
Python Is Not Java
I was recently looking at the source of a wxPython-based GUI application, about 45.5KLOC in size, not counting the libraries used (e.g. Twisted). The code was written by Java developers who are relatively new to Python, and it suffers from some performance issues (like a 30-second startup time). In examining the code, I found that they had done lots of things that make sense in Java, but which suck terribly in Python. Not because "Python is slower than Java", but because there are easier ways to accomplish the same goals in Python, that wouldn't even be possible in Java. -
Python Is Not Java
I was recently looking at the source of a wxPython-based GUI application, about 45.5KLOC in size, not counting the libraries used (e.g. Twisted). The code was written by Java developers who are relatively new to Python, and it suffers from some performance issues (like a 30-second startup time). In examining the code, I found that they had done lots of things that make sense in Java, but which suck terribly in Python. Not because "Python is slower than Java", but because there are easier ways to accomplish the same goals in Python, that wouldn't even be possible in Java. - 1 more annotations...
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.