Message170822
| Author |
chris.jerdonek |
| Recipients |
chris.jerdonek, docs@python |
| Date |
2012年09月20日.16:47:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The documentation for round() says:
round(x[, n])
Return the floating point value x rounded to n digits after the decimal point. If n is omitted, it defaults to zero. Delegates to x.__round__(n).
(from http://docs.python.org/dev/library/functions.html#round )
However, we have the following:
Python 3.3.0rc2+ (default:1704deb7e6d7+, Sep 16 2012, 04:49:45)
>>> round(x=4.7)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Required argument 'number' (pos 1) not found
>>> round(number=4.7)
5
The second argument is also affected:
>>> round(5.1234, n=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'n' is an invalid keyword argument for this function
>>> round(5.1234, ndigits=3)
5.123 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月20日 16:47:53 | chris.jerdonek | set | recipients:
+ chris.jerdonek, docs@python |
| 2012年09月20日 16:47:53 | chris.jerdonek | set | messageid: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> |
| 2012年09月20日 16:47:53 | chris.jerdonek | link | issue15985 messages |
| 2012年09月20日 16:47:52 | chris.jerdonek | create |
|