Opened 10 years ago

Closed 8 years ago

#7965 closed defect (fixed)

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 Merged in: sage-5.0.beta1
Authors: Michael Orlitzky Reviewers: Marco Streng, Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
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 (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by mjo

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

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 8 years ago by mstreng

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

comment:3 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-4.8 to sage-5.0

comment:4 Changed 8 years ago by jdemeyer

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

Rebased to #10596, added one test.

Changed 8 years ago by jdemeyer

Add a doctest with the example from the description.

comment:5 Changed 8 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:6 Changed 8 years ago by mjo

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

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 8 years ago by jdemeyer

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