Move Add.compare_terms to Basic._compare_pretty
commit58151390daa858b5a90dd6da9743c4cf615765fc
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Thu, 7 Aug 2008 20:02:51 +0000 (8 00:02 +0400)
committerKirill Smelkov <kirr@landau.phys.spbu.ru>
Thu, 7 Aug 2008 20:02:51 +0000 (8 00:02 +0400)
tree65b63fb63b76a1b28c6527fab0cbe26473db85bd
parentcf56ff20a323047d514fffc514032c3ccf3d1ddb
Move Add.compare_terms to Basic._compare_pretty

This is currently used for pretty-sorting when printing Adds, but since we are
going to do the same for dicts and sets, it is convenient to move this
pretty-comparison to Basic.

Leading underscore is added to the name to indicate that this function is only
capable to deal with Basic objects. To compare both SymPy and non-SymPy objects
we'll add Basic.compare_pretty in the next patch.

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <ondrej@certik.cz>
sympy/core/add.py
sympy/core/basic.py
sympy/printing/pretty/pretty.py
sympy/printing/repr.py
sympy/printing/str.py