Message111558
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 :) |
|
Date |
User |
Action |
Args |
2010-07-25 21:31:04 | lukasz.langa | set | recipients:
+ lukasz.langa, rhettinger, mark.dickinson, BreamoreBoy |
2010-07-25 21:31:04 | lukasz.langa | set | messageid: <1280093464.08.0.43731742955.issue9379@psf.upfronthosting.co.za> |
2010-07-25 21:31:02 | lukasz.langa | link | issue9379 messages |
2010-07-25 21:31:01 | lukasz.langa | create | |
|