Skip to content

Instantly share code, notes, and snippets.

@willhardy
Created June 9, 2011 19:19
Show Gist options
  • Save willhardy/1017488 to your computer and use it in GitHub Desktop.
Save willhardy/1017488 to your computer and use it in GitHub Desktop.
decimal module strangeness
import decimal
a = decimal.Decimal(0)
isinstance(a, decimal.Decimal) # True
reload(decimal)
isinstance(a, decimal.Decimal) # False
decimal.Decimal(a) # Exception!?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment