Message205695
> I don't understand. There's already a way to make round return an integer: don't pass a second argument.
If this function were to be written in Python, it would be something like:
def round(number, ndigits=0):
...
or
def round(number, ndigits=None):
...
But in C you can forge the signature to whatever you want and parse the arguments accordingly. In Python there's always a way to get the default behavior by passing the default argument, but in C it may not exist (in this case `PyObject *o_ndigits = NULL;`)
So, I propose the default value being `None`, so this behavior can be achieved using a second argument. |
|
Date |
User |
Action |
Args |
2013-12-09 14:14:09 | JBernardo | set | recipients:
+ JBernardo, mark.dickinson, docs@python, vajrasky |
2013-12-09 14:14:09 | JBernardo | set | messageid: <1386598449.67.0.511634331677.issue19933@psf.upfronthosting.co.za> |
2013-12-09 14:14:09 | JBernardo | link | issue19933 messages |
2013-12-09 14:14:09 | JBernardo | create | |
|