You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In isympy:
In [1]: {Basic(): 1, Basic(Basic()): 2}
<long traceback>
AttributeError: 'Basic' object has no attribute 'as_base_exp'
The problem is that Basic._compare_pretty() assumes that its arguments are instances of Expr.
There's the same problem with sets. Basic._compare_pretty() is essentially broken and should be replaced with the new sort-key mechanism everywhere (cf. issue 4590 ).
I'm upping he priority on this because it's a serious usability problem for objects deriving from Basic but not from Expr.
**Summary:** Can't pretty-print dicts or sets containing non-Expr objects
**Labels:** -Priority-Medium Priority-High Milestone-Release0.7.1
**Blockedon:** 4590
It's actually easy to fix. There's a single line to change and a few tests to update.
I've added the commit to PR #326 ( https://github.com/sympy/sympy/pull/326 ).
**Status:** Started
**Labels:** NeedsReview
**Blockedon:** -1491
Original issue for #5306: http://code.google.com/p/sympy/issues/detail?id=2207
Original author: https://code.google.com/u/101272611947379421629/
Original owner: https://code.google.com/u/101272611947379421629/
The text was updated successfully, but these errors were encountered: