[New-bugs-announce] [issue3191] round docstring is inaccurate

Mark Dickinson report at bugs.python.org
Tue Jun 24 17:03:38 CEST 2008


New submission from Mark Dickinson <dickinsm at gmail.com>:

In Python 3.0, help(round) gives the following:

round(...)
    round(number[, ndigits]) -> floating point number
    
    Round a number to a given precision in decimal digits (default 0 
digits).
    This returns an int when called with one argument, otherwise a 
float.
    Precision may be negative.

But in Python 3.x, round(x, n) doesn't always return a float;  for 
example, if x is a Decimal or Fraction then round(x, 2) is again a 
Decimal or Fraction (respectively).

----------
assignee: georg.brandl
components: Documentation
messages: 68690
nosy: georg.brandl, marketdickinson
severity: normal
status: open
title: round docstring is inaccurate
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3191>
_______________________________________


More information about the New-bugs-announce mailing list