[New-bugs-announce] [issue12580] Documentation error in Decimal module

Steve Holden report at bugs.python.org
Sun Jul 17 20:30:02 CEST 2011

New submission from Steve Holden <steve at holdenweb.com>:

We see in the "Quick-Start Tutorial" (py3k section 8.4.1) the following example:

>>> Decimal(3.14)

In actua; fact one would expect an exception from that code, which should perhaps instead read

>>> Decimal.from_float(3.14)

This class method is the recommended way to convert floats to decimal when necessary.

assignee: georg.brandl
messages: 140531
nosy: georg.brandl, holdenweb
priority: normal
severity: normal
status: open
title: Documentation error in Decimal module
versions: Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list