Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 361 Bytes

2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst

File metadata and controls

9 lines (7 loc) · 361 Bytes

Harmonized random.randrange() argument handling to match range().

  • The integer test and conversion in randrange() now uses operator.index().
  • Non-integer arguments to randrange() are deprecated.
  • The ValueError is deprecated in favor of a TypeError.
  • It now runs a little faster than before.

(Contributed by Raymond Hettinger and Serhiy Storchaka.)