bpo-37319: Deprecated support of non-integer arguments in random.randrange(). by serhiy-storchaka · Pull Request #19112 · python/cpython · GitHub

github.com

Tin mới

serhiy-storchaka:randrange-index

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Use index() instead of int() to check args of randrange().

Fallaback to int().

View comments on this commit

awaiting core review

View reviewed changes

Merge branch 'master' into randrange-index

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

Raise TypeError instead of ValueError.

Merge branch 'master' into randrange-index

bpo-42222: Modernize integer test/conversion in randrange() #23064

Revert "Raise TypeError instead of ValueError."

Update docs and emit deprecation warning for ValueError.

Merge branch 'master' into randrange-index

Merge branch 'master' into randrange-index

bpo-37319: Improve documentation, code and tests of randrange. (