[issue9379] random.randrange behaviour problems

2010-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added a doc fix to r84576. Advice is "don't do that" ;-) -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- components: +Documentation -Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: You are welcome to suggest wording. Aim for the shortest explanation that guides people to the right understanding. Being overly specific often causes more harm than good. Instead, try to be maximally helpful to someone just learning about randrange() f

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Łukasz Langa
Łukasz Langa added the comment: Raymond, I agree, that is reasonable. Would you like me to send a patch for the docstring or would you rather make the change on your own? -- ___ Python tracker

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm happy to improve the docs and docstring a bit to match the description for range(). I don't want to change any of the keyword arguments because it can break code that currently works and has been working for ages. It's a fact of life that the range()

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Łukasz Langa
Łukasz Langa added the comment: 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

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Mark Dickinson
Mark Dickinson added the comment: On issue 2: I agree that this is strange behavior, and would be interested to see a patch. It's not 100% clear to me what the patched code should do, though. In particular, an example like: >>> randrange(10, step=5) that mixes positional and keyword argume

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9379] random.randrange behaviour problems

2010-07-25 Thread Łukasz Langa
New submission from Łukasz Langa : Two behaviour problems with random.randrange: 1. Method argument `start` behaves as `stop` if `stop` is not defined: == >>> from random import randrange >>> help(randrange) Help on method rand