Opened 15 years ago

Closed 15 years ago

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

Reported by: Owned by: Martin Albrecht Martin Albrecht trivial sage-duplicate/invalid/wontfix commutative algebra N/A

### 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
```

### comment:1 Changed 15 years ago by Martin Albrecht

Summary: rename MPolynomialRing.repr_long method to __str__ → [with patch, needs review] rename MPolynomialRing.repr_long method to __str__

### comment:2 Changed 15 years ago by ncalexan

Summary: [with patch, needs review] rename MPolynomialRing.repr_long method to __str__ → [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 15 years ago by Martin Albrecht

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

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 15 years ago by Martin Albrecht

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

### comment:5 Changed 15 years ago by Martin Albrecht

Milestone: sage-3.0 → sage-duplicate/invalid → wontfix new → closed
Note: See TracTickets for help on using tickets.