Dear Nick

On Jan 20, 8:24 pm, Nick Alexander <[EMAIL PROTECTED]> wrote:
> 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.

Sorry for coming into your discussion. I actually appreciate that x/y
and print x/y do different things, for the following reason.

If someone defines some sage object X and just types
sage: X
then the command is very short, and when i ask a short question, the
answer ought to be short as well.

On the other hand, if the user's demand on displaying X is more
elaborate, such as
sage: print X
then the displayed information should be more elaborate as well.

Hence, it makes sense to me that X.__repr__() (which is invoked by
sage: X) just returns a brief description, while X.__str__() (invoked
by sage: print X) can be more lengthy and should be descriptive enough
to reconstruct X.

Yours
     Simon

--~--~---------~--~----~------------~-------~--~----~
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