Ticket #3774 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch, positive review] __radd__ doesn't work when left hand side is an Element

Reported by: robertwb Owned by: robertwb
Priority: major Milestone: sage-3.1.3
Component: coercion Keywords:
Cc: AlexGhitza Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

On Aug 1, 2008, at 7:05 AM, Nils Skoruppa wrote:


It seems that,  for non elements,  __radd__ is set disfunctional
by the coercion model. On the other hand, it might be desirable
to have this enabled for people writing their own classes but having
reasons to avoid (parts of)  the coercion system (like me :-)


Attachments

3774-radd.patch Download (1.2 KB) - added by robertwb 5 years ago.
trac_3774.patch Download (2.2 KB) - added by mhansen 5 years ago.

Change History

Changed 5 years ago by robertwb

comment:1 Changed 5 years ago by robertwb

  • Summary changed from __radd__ doesn't work when left hand side is an Element to [with patch, needs review] __radd__ doesn't work when left hand side is an Element

comment:2 Changed 5 years ago by robertwb

Might depend on #3738.

comment:3 Changed 5 years ago by mhansen

This could use a doctest. robertwb, do you want to write one, if not, I can probably do it a bit later.

comment:4 Changed 5 years ago by robertwb

Please go ahead and write one, though implementing __radd__ should not be encouraged.

comment:5 Changed 5 years ago by AlexGhitza

  • Cc AlexGhitza added

Changed 5 years ago by mhansen

comment:6 Changed 5 years ago by mhansen

  • Summary changed from [with patch, needs review] __radd__ doesn't work when left hand side is an Element to [with patch, positive review] __radd__ doesn't work when left hand side is an Element

Okay, the new patch should apply. Positive review.

comment:7 Changed 5 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged trac_3774.patch in Sage 3.1.3.alpha1

Note: See TracTickets for help on using tickets.