Raymond Hettinger added the comment:

> there's still no way to represent repeat's signature in Python
There is a way using *args and **kwds but that isn't any fun (just like range() 
or min() in that regard).

Right now, repeat() does what it is supposed to do.  It may currently be 
inconvenient for the argument clinic, but changing repeat() in way that no one 
currently needs smacks of having the tail wag the dog ;-)

What I would like to see in the future is better support for optional arguments 
in
PyArg_ParseTupleAndKeywords.  Right now, "O|n:repeat" precludes us from using 
None or some sentinel object to mean the same as the-argument-was-omitted.   To 
put a None default value in now, we would have to do tricks with "O|O" and then 
manually write the "|n" validation, type conversion, and associated error 
messages.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19145>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to