Opened 6 years ago

Closed 16 months ago

#20850 closed defect (invalid)

AdditiveMagmas.ParentMethods.summation calls _add_ without checking

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: categories Keywords:
Cc: nthiery, tscrim Merged in:
Authors: Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

In src/sage/categories/, there is

class AdditiveMagmas(Category_singleton):
    class ParentMethods:
        def summation(self, x, y):
            return x._add_(y)

It's dangerous to call _add_ without checking. Either this should just be x + y, or there should be type checking for x and y, or there should be conversion of x and y to the correct parent.

Change History (6)

comment:1 Changed 6 years ago by jdemeyer

  • Cc vdelecroix removed

comment:2 Changed 6 years ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 18 months ago by mkoeppe

  • Cc tscrim added
  • Milestone changed from sage-7.3 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

This is outdated; the code has changed since

comment:4 Changed 18 months ago by tscrim

  • Status changed from needs_review to positive_review

comment:5 Changed 18 months ago by tscrim

  • Reviewers set to Travis Scrimshaw

comment:6 Changed 16 months ago by slelievre

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.