On 20-Jan-08, at 9:27 AM, Martin Albrecht wrote:

>
> On Sunday 20 January 2008, didier deshommes wrote:
>> On Jan 20, 2008 11:20 AM, Martin Albrecht <[EMAIL PROTECTED] 
>> bremen.de>
> wrote:
>>> Hi there,
>>>
>>> I've submitted the patch
>>>
>>>    http://trac.sagemath.org/sage_trac/ticket/1816
>>>
>>> to trac and Nick refereed it. The patch implements that if a  
>>> multivariate
>>> polynomial ring is 'print'ed the output is quite verbose and  
>>> structured.
>>> This behavior was in repr_long() before.
>>>
>>> EXAMPLE:
>>>
>>> {{{
>>> 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
>>>               Names    : x
>>>    Block  1 : Ordering : lex
>>>               Names    : y, z
>>> }}}
>>
>> Will
>> sage: P
>>
>> give the same verbose output? If so, I would give this a -0: I don't
>> like it but it won't bother me as much.
>>
>> didier
>
> No, it would not. You can play with the behavior by considering  
> symbolic
> expressions:
>
> sage: x,y = var('x,y')
> sage: x/y
> sage: print x/y
> sage: str(x/y)

I've always hated that x/y and print x/y can do different things at  
the prompt, but it sounds like I'm fighting a losing battle.

Can someone (malb?) briefly document what the Sage standard for str  
and repr should be, so we can start updating the code?

Thanks!
Nick

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to