Opened 4 years ago
Closed 4 years ago
#26850 closed defect (fixed)
Small fix for unicode_art of IndexedFreeModuleElement
Reported by: | gh-mwageringel | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.5 |
Component: | algebra | Keywords: | unicode_art |
Cc: | Merged in: | ||
Authors: | Markus Wageringel | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | 4969f35 (Commits, GitHub, GitLab) | Commit: | 4969f354e00217a2a55ce5811334d3dd95d8426f |
Dependencies: | Stopgaps: |
Description
The unicode_art
of IndexedFreeModuleElement
incorrectly returns type str
for the zero element.
sage: S = SymmetricGroupAlgebra(QQ, 3) sage: unicode_art(S.zero()) '0' sage: type(unicode_art(S.zero())) <type 'str'>
As a result, building UnicodeArt
expressions that have zero as subexpressions fails with an AttributeError
. This can be particularly unexpected with the %display unicode_art
option. Various algebras are affected by this.
sage: unicode_art([S.zero()]) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ... AttributeError: 'str' object has no attribute 'get_breakpoints'
Change History (5)
comment:1 Changed 4 years ago by
Branch: | → u/gh-mwageringel/indexed_element_unicode |
---|---|
Commit: | → 4969f354e00217a2a55ce5811334d3dd95d8426f |
Status: | new → needs_review |
comment:3 Changed 4 years ago by
Status: | needs_review → positive_review |
---|
comment:5 Changed 4 years ago by
Branch: | u/gh-mwageringel/indexed_element_unicode → 4969f354e00217a2a55ce5811334d3dd95d8426f |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
New commits:
Fix return type of _unicode_art_ for IndexedFreeModuleElement