Looking for resources for making the jump from Java to Python easier and more productive

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Apr 22 05:05:13 EDT 2006


In article <1145691651.385835.298600 at u72g2000cwu.googlegroups.com>,
 "ToddLMorgan" <ToddLMorgan at gmail.com> wrote:

>I'm looking for the common types of mistakes that say a Java/C# or
>even C++ developer may commonly make.

Using subclassing when you don't have to. For instance, you might have a 
Java method which takes an argument of type java.io.OutputStream to 
which it writes. You might translate this to a Python method to which 
you are careful to only pass instances of subclasses of file objects. 
But in fact there is no necessity for this: you are free to pass any 
object which has appropriate members.

I suppose this is an instance of the more general rule: "using OO when 
you don't have to".



More information about the Python-list mailing list