Opened 8 months ago

Closed 8 months ago

#27572 closed enhancement (fixed)

fix some comparisons to True, False and None

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.8
Component: refactoring Keywords:
Cc: tscrim Merged in:
Authors: Frédéric Chapoton Reviewers: Jeroen Demeyer, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 0e029fb (Commits) Commit: 0e029fbc1c40b9b8d16ce9035d4c7e5bd849a4a8
Dependencies: Stopgaps:

Description


Change History (7)

comment:1 Changed 8 months ago by chapoton

  • Branch set to u/chapoton/27572
  • Commit set to 7f776cd8582849aec26a373b50c8ac7a92fbb740
  • Status changed from new to needs_review

New commits:

7f776cdfix some comparisons to True, False and None

comment:2 Changed 8 months ago by jdemeyer

Instead of

ineg = bool(ik < 0)

even better would be

cdef bint ineg

that would automatically and efficiently convert to bool.

Last edited 8 months ago by jdemeyer (previous) (diff)

comment:3 Changed 8 months ago by git

  • Commit changed from 7f776cd8582849aec26a373b50c8ac7a92fbb740 to 0e029fbc1c40b9b8d16ce9035d4c7e5bd849a4a8

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

0e029fbtrac 27572 one detail

comment:4 Changed 8 months ago by chapoton

Thx, done (I hope that I have interpreted correctly the suggestion).

comment:5 Changed 8 months ago by chapoton

  • Cc tscrim added

comment:6 Changed 8 months ago by tscrim

  • Reviewers set to Jeroen Demeyer, Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

Jeroen, I added you as a reviewer because of comment:2.

comment:7 Changed 8 months ago by vbraun

  • Branch changed from u/chapoton/27572 to 0e029fbc1c40b9b8d16ce9035d4c7e5bd849a4a8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.