Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
Closed
Description
Documentation
The docs forbisect.bisect use a kind of funky pattern with a list as a default argument:
https://docs.python.org/3/library/bisect.html#examples

Using a list as a default argument is a really common pattern beginners think will be helpful but usually isn't due to the way default arguments are bound to the class object instead of instances. It's also distracting for more advanced readers who are trained to spot this pattern in code reviews.
IMO this example would be clearer ifgrade accepted no arguments besidesscore and the defaults were inlined.
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Todo