Opened 11 years ago

Closed 11 years ago

#7077 closed defect (fixed)

variables() inconsistently returns a list or tuple

Reported by: jason Owned by: tbd
Priority: minor Milestone: sage-4.2
Component: algebra Keywords:
Cc: mhansen Merged in: sage-4.2.alpha1
Authors: Alex Ghitza Reviewers: Karl-Dieter Crisman
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

with 4.1.1:

sage: x,y,z=polygens(QQ,'x,y,z')
sage: (x^2).variables()
[x]
sage: x=polygen(QQ)
sage: (x^2).variables()
(x,)

Attachments (1)

trac_7077.patch (9.7 KB) - added by AlexGhitza 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by AlexGhitza

comment:1 Changed 11 years ago by AlexGhitza

  • Authors set to Alex Ghitza
  • Status changed from new to needs_review

There are a number of methods called variables() in the Sage library. The attached patch makes sure that all of them return tuples. (This is what univariate polynomials, and symbolics return.)

comment:2 Changed 11 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Status changed from needs_review to positive_review

Seems to perform as advertised, passes relevant tests, as far as I can tell catches all the cases. Positive review.

comment:3 Changed 11 years ago by mhansen

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