Ticket #10660 (closed defect: fixed)
Remove the "word:" identifier from the output of str method of word
|Reported by:||slabbe||Owned by:||slabbe|
|Cc:||tmonteil, abmasse||Work issues:|
|Report Upstream:||N/A||Reviewers:||Alexandre Blondin Massé|
|Authors:||Sébastien Labbé||Merged in:||sage-4.7.alpha2|
Remove the "word:" identifier from the output of str method of word (and keep it only for repr).
Indeed, this is due to a bad initial design. It is now time to fix it. The "word:" identifier should be reserved for the repr method. The str method should return only the sequence of letters.
Before, the string_rep was doing that job of not printing the identifier. The problem is that things like "... %s ..." % word does not call the string_rep but the str method which includes the identifier...
This bad design is now causing problems in other modules. For instance, see ticket #10547 merged recently who changed the vertices of the De Bruijn Graph from Word type to str type. I think it is now time to fix the problem at the source (and then, put De Brujn Graph as it was before) before it creates more problems elsewhere.
Patch to be posted soon.
- Cc tmonteil, abmasse added
- Status changed from new to needs_review
- Status changed from needs_review to positive_review
- Reviewers set to Alexandre Blondin Massé
- Authors set to Sébastien Labbé