mwtoews/shapely — pull request #1 by takluyver (2013-07-02 16:31:46+00:00)
Title: More Python 3 work

This fixes a few more things for Python 3. Now on 3.3 I get either 1 failure or 7 depending on the random order it picks for dictionaries. i.e. one real failure.

There are a few alternative ways to handle iterable objects, which was the main class of bugs I fixed. I've mostly gone for EAFP, but hasattr or isinstance checks would work as well. What's best depends on the range of types that can be passed, and how often they are passed. Exception handling is cheaper than if/else if the try: succeeds, but more expensive if it goes to the except: clause, IIRC.