Ticket #13106 (new defect)
Use of bin_op in rings_pari_ring.py
| Reported by: | fschulze | Owned by: | robertwb |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.10 |
| Component: | coercion | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | |
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by fschulze) (diff)
While adding doctest for #12550 I found the following.
sage: R = Pari
Pari PariError PariGroup PariRing
sage: R = PariRing()
sage: a = R(2)
sage: a^2
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/agag/schulze/<ipython console> in <module>()
/home/schulze/sage-5.1.beta3/local/lib/python2.7/site-packages/sage/rings/pari_ring.pyc in __pow__(self, other)
69 def __pow__(self, other):
70 if not isinstance(other, Pari):
---> 71 return bin_op(self, other, operator.pow)
72 return self.__class__(self.__x ** other.__x, parent=_inst)
73
NameError: global name 'bin_op' is not defined
sage:
This would be easy to fix using using an explicit Pari(other). Would this be the correct fix or should one do something else using the coercen system?
Note: See
TracTickets for help on using
tickets.
