Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ascii pprint of ProductSet uses non-ascii multiplication symbol #10413

Closed
cbm755 opened this issue Jan 18, 2016 · 1 comment
Closed

ascii pprint of ProductSet uses non-ascii multiplication symbol #10413

cbm755 opened this issue Jan 18, 2016 · 1 comment
Labels
Easy to Fix This is a good issue for new contributors. Feel free to work on this if no one else has already. printing sets

Comments

@cbm755
Copy link
Contributor

cbm755 commented Jan 18, 2016

>>> srepr(A)
'ProductSet(FiniteSet(Rational(13, 111), Integer(2), Integer(3)), FiniteSet(exp(Integer(10)), Mul(Rational(1, 2), pi)))'

>>> pprint(A, use_unicode=True)
⎧ 13      ⎫   ⎧π   10⎫
⎨───, 2, 3⎬ × ⎨─, ℯ  ⎬
⎩111      ⎭   ⎩2     ⎭

>>> pprint(A, use_unicode=False)
  13           pi   10 
{---, 2, 3} × {--, e  }
 111           2       

Last one should be x not \xd7. See printing/pretty/pretty.py.

Possible fix might be:
prod_char = U('MULTIPLICATION SIGN') if self._use_unicode else 'x'

Also needs a test---can be simplier than mine.

@cbm755 cbm755 added Easy to Fix This is a good issue for new contributors. Feel free to work on this if no one else has already. printing sets labels Jan 18, 2016
tokencolour added a commit to tokencolour/sympy that referenced this issue Jan 18, 2016
@tokencolour
Copy link
Contributor

I'll change the tests if they fail. Thanks, @cbm755 .

tokencolour added a commit to tokencolour/sympy that referenced this issue Jan 18, 2016
Checks multiplication symbol for
both unicode and ascii
Fixes sympy#10413
tokencolour added a commit to tokencolour/sympy that referenced this issue Jan 19, 2016
Changed '\xd7`
Changed name of test function
Removed redundant import
Fixes sympy#10413
skirpichev pushed a commit to skirpichev/diofant that referenced this issue Feb 1, 2017
skirpichev pushed a commit to skirpichev/diofant that referenced this issue Mar 17, 2017
skirpichev pushed a commit to skirpichev/diofant that referenced this issue Mar 18, 2017
Fixes sympy/sympy#10413

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy to Fix This is a good issue for new contributors. Feel free to work on this if no one else has already. printing sets
Projects
None yet
Development

No branches or pull requests

2 participants