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 lukasz.langa
Recipients BreamoreBoy, lukasz.langa, mark.dickinson, rhettinger
Date 2010-07-25.21:31:01
SpamBayes Score 0.004375921
Marked as misclassified No
Message-id <1280093464.08.0.43731742955.issue9379@psf.upfronthosting.co.za>
In-reply-to
Content
My suggestions on how the patches should work always assumed that we want 100% backward compatibility and there might exist some crazy code that is actually using positional/keyword argument mixing. If that is no problem for us then I'm all in favor of removing the posibility to mix positional with keyword args in this case.

1B is meant to solve the help() issue. The basic idea is to change the definition so that help() shows a sensible default for all cases. The current one when `start` becomes `stop` is not. The new definition would be:

  def randrange(self, limit, *args, **kwargs)

The docstring would need to have an explanation on the role of `limit` in each sensible case.

Then in the function body there would be some basic code going through what was specified by the user in the args, to assign these values to variables for existing implementation (which is OK).

In effect, there would be 3 major advantages:
- this is backward compatible
- help() would not confuse users
- invocations like randrange(start=30) or randrange(stop=10, step=8) would work properly

If you don't strongly disagree then maybe it will be simpler to just provide a patch for you to review :)
History
Date User Action Args
2010-07-25 21:31:04lukasz.langasetrecipients: + lukasz.langa, rhettinger, mark.dickinson, BreamoreBoy
2010-07-25 21:31:04lukasz.langasetmessageid: <1280093464.08.0.43731742955.issue9379@psf.upfronthosting.co.za>
2010-07-25 21:31:02lukasz.langalinkissue9379 messages
2010-07-25 21:31:01lukasz.langacreate