#30457 closed enhancement (fixed)

fix typos in occurrence, occurred, occurring

Reported by: chapoton Owned by:
Priority: minor Milestone: sage-9.3
Component: documentation Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Samuel Lelièvre
Report Upstream: N/A Work issues:
Branch: 2459cd8 (Commits, GitHub, GitLab) Commit: 2459cd806a5a8ed4ad2da5fe884fbe21672d21a1
Dependencies: Stopgaps:

Status badges

Change History (19)

comment:1 Changed 13 months ago by chapoton

  • Branch set to u/chapoton/30457
  • Commit set to 7d629a2f0572aab41778a5e6f7c5eff9278ec39b
  • Status changed from new to needs_review

New commits:

7d629a2fix typos in occurrence, occurred, occurring (all take two r)

comment:2 Changed 13 months ago by git

  • Commit changed from 7d629a2f0572aab41778a5e6f7c5eff9278ec39b to c4ee43b00a3ffcd18d204f793052dac838b2ef46

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

c4ee43bsome pyflakes details in modified files

comment:3 Changed 13 months ago by slelievre

  • Reviewers set to Samuel Lelièvre

Agree with all the occur* fixes here.

One comment about the removal of the CommonR = ... line at the end of this if/else block:

 if hasattr(PARENT,'_P'):
     CommonR = PARENT._P
 else:
     VarList = set([])
     for P in TODO:
         if P._p!=0:
             if P.is_unit(): # self generates all of PARENT
                 if RStrat is not None:
                     RStrat.add_generator(PARENT(1))
                 return SymmetricIdeal(PARENT,[PARENT(1)], coerce=False)
             VarList = VarList.union(P._p.parent().variable_names())
     VarList = list(VarList)
     if not VarList:
         return SymmetricIdeal(PARENT,[0])
     VarList.sort(key=PARENT.varname_key, reverse=True)
     from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
-    CommonR = PolynomialRing(self.base_ring(), VarList, order=self.ring()._order)

This block is at lines 502--518 of src/sage/rings/polynomial/symmetric_ideal.py.

Since the value of CommonR set in this block is not used after that (whether it was set in the "if" or in the "else" part), and neither is the value of VarList, the whole if/else block could become:

if not hasattr(PARENT, '_P'):
    VarList = set()
    for P in TODO:
        if P._p != 0:
            if P.is_unit():  # self generates all of PARENT
                if RStrat is not None:
                    RStrat.add_generator(PARENT(1))
                return SymmetricIdeal(PARENT, [PARENT(1)], coerce=False)
            VarList = VarList.union(P._p.parent().variable_names())
    VarList = list(VarList)
    if not VarList:
        return SymmetricIdeal(PARENT, [0])

This could be done here or elsewhere, as quite distinct from the rest of the present ticket.

Possibly PARENT(1) should be PARENT.one().

comment:4 Changed 13 months ago by git

  • Commit changed from c4ee43b00a3ffcd18d204f793052dac838b2ef46 to 9fab3e1e08e2441eb92cdc5e1b176ea31d317890

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

9fab3e1fixing pyflakes warnings in symmetric ideals

comment:5 Changed 13 months ago by chapoton

Voilà, voilà. Merci pour la suggestion.

comment:6 Changed 13 months ago by chapoton

fully green bot, please review

comment:7 Changed 13 months ago by slelievre

In src/sage/graphs/generic_graph.py, while we're at it, maybe fix plural:

-            # We count the number of occurrence of each distinct label
+            # We count the number of occurrences of each distinct label
Last edited 13 months ago by slelievre (previous) (diff)

comment:8 Changed 13 months ago by slelievre

And regarding R(1) vs R.one() here is one more:

- return SymmetricIdeal(self.ring(), [self.ring()(1)],
+ return SymmetricIdeal(self.ring(), [self.ring().one()],

comment:9 Changed 13 months ago by slelievre

Maybe fix "can not" -> "cannot"? or maybe do that at a wider scale in another ticket.

Then positive review.

comment:10 Changed 13 months ago by slelievre

Changing R(1) to R.one() and R(0) to R.zero() at scale could also be another ticket.

comment:11 Changed 13 months ago by git

  • Commit changed from 9fab3e1e08e2441eb92cdc5e1b176ea31d317890 to bc66b56c0ada7294961273c6d09351a56593ddc4

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

bc66b56extra details

comment:12 Changed 13 months ago by chapoton

Et voilà. C'est bon, maintenant ?

comment:13 Changed 13 months ago by slelievre

  • Status changed from needs_review to positive_review

Magnifique.

comment:14 Changed 13 months ago by git

  • Commit changed from bc66b56c0ada7294961273c6d09351a56593ddc4 to 724ad120ee82340b47b8da1598d59f7aeed31a1d
  • Status changed from positive_review to needs_review

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

724ad12Merge branch 'u/chapoton/30457' in 9.2.b12

comment:15 Changed 13 months ago by chapoton

  • Status changed from needs_review to positive_review

rebase, just fixing an easy conflict in combinatorial_face.pyx

setting back to positive

comment:16 Changed 11 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:17 Changed 11 months ago by git

  • Commit changed from 724ad120ee82340b47b8da1598d59f7aeed31a1d to 2459cd806a5a8ed4ad2da5fe884fbe21672d21a1
  • Status changed from positive_review to needs_review

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

2459cd8Merge branch 'u/chapoton/30457' in 9.3.b0

comment:18 Changed 11 months ago by chapoton

  • Status changed from needs_review to positive_review

trivial rebase, set back to positive

comment:19 Changed 11 months ago by vbraun

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