[Python-Dev] AC Derby and accepting None for optional positional arguments

Serhiy Storchaka storchaka at gmail.com
Thu Jan 16 09:25:20 CET 2014


16.01.14 07:55, Larry Hastings написав(ла):
>   * itertools.repeat deliberately makes it impossible to provide an
>     argument for "times" that behaves the same as not providing the
>     "times" argument, and
>   * there is currently no way to implement this behavior using Argument
>     Clinic.  (I'd have to add a hack where impl functions also get args
>     and kwargs.)

/*[clinic input]
itertools.times
     object: object
     [
     times: int
     ]
[clinic start generated code]*/

> Are you suggesting that, when converting builtins to Argument Clinic
> with unrepresentable default values, we're permitted to tweak the
> defaults to something representable?

I think we need some standard placeholder for unrepresentable default 
value. May be "..." or "?"?




More information about the Python-Dev mailing list