Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 4
    I know you're new to Python, but a) don't check types b) don't use mutable default arguments c) use underscore_separated format for names d) no need for return unless you're returning a value e) no semicolons at end of lines f) consider whether you really need classes at all. Commented Jul 2, 2013 at 11:35
  • @DanielRoseman: Thanks for the valuable suggestions Commented Jul 2, 2013 at 11:38
  • @DanielRoseman > don't check types < what about using assert isisntance(items, dict) instead of if type(items) != type({})? Commented Jul 2, 2013 at 11:56