Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of __nonzero__ and use __bool__ instead #33558

Closed
fchapoton opened this issue Mar 25, 2022 · 18 comments
Closed

get rid of __nonzero__ and use __bool__ instead #33558

fchapoton opened this issue Mar 25, 2022 · 18 comments

Comments

@fchapoton
Copy link
Contributor

as this is the official python3 choice

the first 2 commits were scripted

other commits are hand-made, finishing the task

CC: @tscrim @slel @kliem @kwankyu

Component: refactoring

Author: Frédéric Chapoton

Branch/Commit: b24ef83

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/33558

@fchapoton fchapoton added this to the sage-9.6 milestone Mar 25, 2022
@fchapoton
Copy link
Contributor Author

Commit: 82dffdf

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/33558

@fchapoton
Copy link
Contributor Author

New commits:

fc660bbget rid of `__nonzero__` aliases for __bool__
82dffdfconvert `__nonzero__` to __bool__

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

969cbcdeven less __nonzero__

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Changed commit from 82dffdf to 969cbcd

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

b16bc4amanual fixes for __nonzero__

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Changed commit from 969cbcd to b16bc4a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Changed commit from b16bc4a to cf98130

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

cf98130fine tuning : full removal of __nonzero__

@fchapoton
Copy link
Contributor Author

New commits:

b16bc4amanual fixes for __nonzero__
cf98130fine tuning : full removal of __nonzero__

@fchapoton

This comment has been minimized.

@fchapoton
Copy link
Contributor Author

comment:6

green bot ! boring, but should be easy to review ?

@tscrim
Copy link
Collaborator

tscrim commented Mar 27, 2022

comment:7

LGTM. It is good to have this done so I no longer have to look up which one I should use (and instead can just look at the code within Sage).

@tscrim
Copy link
Collaborator

tscrim commented Mar 27, 2022

Reviewer: Travis Scrimshaw

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 27, 2022

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

b24ef83Merge branch 'u/chapoton/33558' in 9.6.B6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 27, 2022

Changed commit from cf98130 to b24ef83

@fchapoton
Copy link
Contributor Author

comment:9

set back to positive after trivial rebase on 9.6.beta6

@vbraun
Copy link
Member

vbraun commented Apr 2, 2022

Changed branch from u/chapoton/33558 to b24ef83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants