Re: [sympy] Is piece of code in StrPrinter ever reachable?

2021-02-13 Thread Oscar Benjamin
On Sat, 13 Feb 2021 at 12:34, Paul Royik wrote: > > In StrPrinter there is > def emptyPrinter(self, expr): > if isinstance(expr, str): > return expr > elif isinstance(expr, Basic): > return repr(expr) > else: > return str(expr) > > Is `return repr(expr)` reachable if `StrPrinter` defines

[sympy] Is piece of code in StrPrinter ever reachable?

2021-02-13 Thread Paul Royik
In StrPrinter there is def emptyPrinter(self, expr): if isinstance(expr, str): return expr elif isinstance(expr, Basic): return repr(expr) else: return str(expr) Is `return repr(expr)` reachable if `StrPrinter` defines `_print_Basic` that prints all `Basic` objects? -- You received this