classification
Title: round docstring is inaccurate
Type: Stage:
Components: Documentation Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: georg.brandl, mark.dickinson
Priority: normal Keywords:

Created on 2008-06-24 15:03 by mark.dickinson, last changed 2008-07-01 20:40 by georg.brandl. This issue is now closed.

Messages (2)
msg68690 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-24 15:03
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).
msg69073 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-01 20:40
Fixed in r64634.
History
Date User Action Args
2008-07-01 20:40:12georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg69073
2008-06-30 22:17:54mark.dickinsonsetassignee: georg.brandl -> mark.dickinson
2008-06-24 15:03:36mark.dickinsoncreate