This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients belopolsky, ezio.melotti, larry, python-dev, rhettinger, serhiy.storchaka, terry.reedy, vajrasky
Date 2014-06-25.06:48:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403678927.58.0.7328476282.issue19145@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-06-25 06:48:47rhettingersetrecipients: + rhettinger, terry.reedy, belopolsky, larry, ezio.melotti, python-dev, serhiy.storchaka, vajrasky
2014-06-25 06:48:47rhettingersetmessageid: <1403678927.58.0.7328476282.issue19145@psf.upfronthosting.co.za>
2014-06-25 06:48:47rhettingerlinkissue19145 messages
2014-06-25 06:48:47rhettingercreate