Comment #9 on issue 1491 by Toon.Verstraelen: generalize mainvar in
LatexPrinter
http://code.google.com/p/sympy/issues/detail?id=1491
Ordering in _print_Add should not only be a part of the LatexPrinter. Can't
we do
this in the Printer base class? One could implemented an iterator method
like this:
class Printer(object):
def iter_terms(self, expr):
if not isinstance(expr, Add):
raise TypeError()
if self.add_cmp is None:
for arg in expr.args:
yield arg
else:
for arg in sorted(expr.args, cmp=self.add_cmp):
yield arg
This iter method can be used by all printers who feel the need for it.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---