Ticket #7965 (closed defect: fixed)

Opened 3 years ago

Last modified 16 months ago

quo_rem attribute error (probably easy to fix?)

Reported by: was Owned by: AlexGhitza
Priority: major Milestone: sage-5.0
Component: basic arithmetic Keywords:
Cc: mjo Work issues:
Report Upstream: N/A Reviewers: Marco Streng, Michael Orlitzky
Authors: Michael Orlitzky Merged in: sage-5.0.beta1
Dependencies: #10596 Stopgaps:

Description

sage: 5.quo_rem(2/3)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/virtual/scratch/wstein/build/sage-4.3.1.rc0/<ipython console> in <module>()

/virtual/scratch/wstein/build/sage-4.3.1.rc0/local/lib/python2.6/site-packages/sage/rings/integer.so in sage.rings.integer.Integer.quo_rem (sage/rings/integer.c:16710)()

/virtual/scratch/wstein/build/sage-4.3.1.rc0/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.FieldElement.quo_rem (sage/structure/element.c:15715)()

AttributeError: 'sage.rings.rational.Rational' object has no attribute '_parent'

Attachments

sage-trac_7965.patch Download (1.1 KB) - added by jdemeyer 16 months ago.
Add a doctest with the example from the description.

Change History

comment:1 Changed 16 months ago by mjo

  • Cc mjo added
  • Status changed from new to needs_review
  • Authors set to Michael Orlitzky

This looks fixed, at least for the rationals. I've added a doctest and changed the description of the other input which was weird anyway.

comment:2 Changed 16 months ago by mstreng

  • Status changed from needs_review to positive_review
  • Reviewers set to Marco Streng

comment:3 Changed 16 months ago by jdemeyer

  • Milestone changed from sage-4.8 to sage-5.0

comment:4 Changed 16 months ago by jdemeyer

  • Status changed from positive_review to needs_work
  • Dependencies set to #10596

Rebased to #10596, added one test.

Changed 16 months ago by jdemeyer

Add a doctest with the example from the description.

comment:5 Changed 16 months ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:6 Changed 16 months ago by mjo

  • Status changed from needs_review to positive_review
  • Reviewers changed from Marco Streng to Marco Streng, Michael Orlitzky

The ticket number is missing from the commit message, but I suppose that's how you want it? The new patch applies and tests cleanly.

comment:7 Changed 16 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.0.beta1
Note: See TracTickets for help on using tickets.