Opened 12 years ago

Closed 12 years ago

#1816 closed enhancement (wontfix)

[with patch, with negative review] rename MPolynomialRing.repr_long method to __str__

Reported by: malb Owned by: malb
Priority: trivial Milestone: sage-duplicate/invalid/wontfix
Component: commutative algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Just as symbolic variables behave (and what is the Python-way IIRC):

sage: f = x/var('y')
sage: f
x/y
sage: str(f)
'                                       x\r\n                                       -\r\n                                       y'
sage: print str(f)
                                       x
                                       -
                                       y

Attachments (1)

trac_1816.patch (1.6 KB) - added by malb 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by malb

comment:1 Changed 12 years ago by malb

  • Summary changed from rename MPolynomialRing.repr_long method to __str__ to [with patch, needs review] rename MPolynomialRing.repr_long method to __str__

comment:2 Changed 12 years ago by ncalexan

  • Summary changed from [with patch, needs review] rename MPolynomialRing.repr_long method to __str__ to [with patch, with negative review] rename MPolynomialRing.repr_long method to __str__

The patch is fine, and does what it says, but it makes it look like printing a polynomial ring will give this verbose output:

sage: P.<x,y,z> = PolynomialRing(QQ,order=TermOrder('degrevlex',1)+TermOrder('lex',2)) 
sage: print P
Multivariate Polynomial Ring
Base Ring : Rational Field 
Size : 3 Variables 
Block  0 : Ordering : degrevlex 

That's *not* okay -- way too much by default!

comment:3 Changed 12 years ago by malb

Because I disagree with Nick's verdict, I forwarded this to [sage-devel]:

http://groups.google.com/group/sage-devel/browse_thread/thread/612b3ec4a61310fa

I figure, that this is more a design choice than a correctness issue and thus it should be discussed on [sage-devel] rather than here. I hope that's okay with you, Nick.

comment:4 Changed 12 years ago by malb

My impression is: The verdict on [sage-devel] was overall negative, so I propose to close this ticket as wontfix.

comment:5 Changed 12 years ago by malb

  • Milestone changed from sage-3.0 to sage-duplicate/invalid
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.