Skip to content

Instantly share code, notes, and snippets.

@shreyansb
Created June 21, 2012 20:03
Show Gist options
  • Save shreyansb/2968207 to your computer and use it in GitHub Desktop.
Save shreyansb/2968207 to your computer and use it in GitHub Desktop.
decimals in python 2.6 - very odd.
[[email protected] ~ ]$ python2.7
Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import Decimal
>>> Decimal('500') < 5597.22
True
>>> quit()
[[email protected] ~ ]$ python2.6
Python 2.6.7 (r267:88850, Aug 5 2011, 03:30:30)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import Decimal
>>> Decimal('500') < 5597.22
False
>>> quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment