mxcl/homebrew — pull request #10485 by claymation (2012-02-26 01:39:17+00:00)
Title: Python build requires llvm and -fwrapv for Decimal division

See issue: https://github.com/mxcl/homebrew/issues/10484

According to:

http://stackoverflow.com/questions/7590137/dividing-decimals-yields-invalid-results-in-python-2-5-to-2-7

the Python interpreter must be built with -fwrapv and llvm (not clang) for proper Decimal division.

To test:

python -c "from decimal import Decimal; print Decimal(4) / Decimal(2)"

If built with llvm and -fwrapv, this yields 2.