title: As a Java programmer learning Python, what should I look out for?
body: <p>Much of my programming background is in Java, and I'm still doing most of my programming in Java. However, I'm starting to learn Python for some side projects at work, and I'd like to learn it as independent of my Java background as possible - i.e. I don't want to just program Java in Python. What are some things I should look out for?</p>
  
  <p>A quick example - when looking through the Python tutorial, I came across the fact that defaulted mutable parameters of a function (such as a list) are persisted (remembered from call to call). This was counter-intuitive to me as a Java programmer and hard to get my head around. (See <a href="https://stackoverflow.com/questions/1132941/least-astonishment-in-python-the-mutable-default-argument">here</a> and <a href="https://stackoverflow.com/questions/2335160/what-is-the-scope-of-a-defaulted-parameter-in-python">here</a> if you don't understand the example.)</p>
  
  <p>Someone also provided me with <a href="http://dirtsimple.org/2004/12/python-is-not-java.html" rel="noreferrer">this</a> list, which I found helpful, but short. Anyone have any other examples of how a Java programmer might tend to misuse Python...? Or things a Java programmer would falsely assume or have trouble understanding?</p>
  
  <p><strong>Edit</strong>: Ok, a brief overview of the reasons addressed by the article I linked to to prevent duplicates in the answers (as suggested by Bill the Lizard). (Please let me know if I make a mistake in phrasing, I've only <em>just</em> started with Python so I may not understand all the concepts fully. And a disclaimer - these are going to be <em>very</em> brief, so if you don't understand what it's getting at check out the link.)</p>
  
  <ul>
  <li>A static method in Java does not translate to a Python classmethod</li>
  <li>A switch statement in Java translates to a hash table in Python</li>
  <li>Don't use XML</li>
  <li>Getters and setters are evil (hey, I'm just quoting :) )</li>
  <li>Code duplication is often a necessary evil in Java (e.g. method overloading), but not in Python</li>
  </ul>
  
  <p>(And if you find this question at all interesting, check out the link anyway. :) It's quite good.)</p>