#17574: Empty hypergraph and __str__ function
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.5
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers:
Authors: Nathann Cohen | Work issues:
Report Upstream: N/A | Commit:
Branch: u/ncohen/17574 | 871738feb57aaa75d015c2fb3af8900a57d50270
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Hey,
It can be useful to keep a function printing all blocks as it is the case
with matrices right now with the method `.str()`:
{{{
sage: m = random_matrix(ZZ,100)
sage: m
100 x 100 dense matrix over Integer Ring (use the '.str()' method to see
the entries)
sage: print m
100 x 100 dense matrix over Integer Ring
sage: m.str()
... # crazy string
}}}
And it is true that `__repr__` and `__str__` coincide.
{{{
sage: m.__repr__()
'100 x 100 dense matrix over Integer Ring'
sage: m.__str__()
'100 x 100 dense matrix over Integer Ring'
}}}
To get a hint when only `m` is typed, you need to hack
`repl/display/fancy_repr.py`.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17574#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.