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:

Status badges


The unicode_art of IndexedFreeModuleElement incorrectly returns type str for the zero element.

sage: S = SymmetricGroupAlgebra(QQ, 3)
sage: unicode_art(
sage: type(unicode_art(
<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([])
AttributeError                            Traceback (most recent call last)
AttributeError: 'str' object has no attribute 'get_breakpoints'

Change History (5)

comment:1 Changed 4 years ago by gh-mwageringel

Branch: u/gh-mwageringel/indexed_element_unicode
Commit: 4969f354e00217a2a55ce5811334d3dd95d8426f
Status: newneeds_review

New commits:

4969f35Fix return type of _unicode_art_ for IndexedFreeModuleElement

comment:2 Changed 4 years ago by chapoton

Reviewers: Frédéric Chapoton

ok, thanks

comment:3 Changed 4 years ago by chapoton

Status: needs_reviewpositive_review

comment:4 Changed 4 years ago by tscrim

I have been meaning to fix this for some time. Thank you!

comment:5 Changed 4 years ago by vbraun

Branch: u/gh-mwageringel/indexed_element_unicode4969f354e00217a2a55ce5811334d3dd95d8426f
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.