qalgebra.printing.sreprprinter module

Provides printers for a full-structured representation

Summary

Classes:

IndentedSReprPrinter

Printer for rendering an expression in such a way that the resulting string can be evaluated in an appropriate context to re-instantiate an identical object, using nested indentation (implementing srepr(expr, indented=True)

IndentedSympyReprPrinter

Indented repr printer for Sympy objects.

QalgebraSReprPrinter

Printer for a string (ASCII) representation.

Reference

class qalgebra.printing.sreprprinter.QalgebraSReprPrinter(cache=None, settings=None)[source]

Bases: qalgebra.printing.base.QalgebraBasePrinter

Printer for a string (ASCII) representation.

sympy_printer_cls

alias of qalgebra.printing.sympy.SympyReprPrinter

emptyPrinter(expr)[source]

Fallback printer

class qalgebra.printing.sreprprinter.IndentedSympyReprPrinter(settings=None)[source]

Bases: qalgebra.printing.sympy.SympyReprPrinter

Indented repr printer for Sympy objects.

doprint(expr)[source]

Returns printer’s representation for expr (as a string)

class qalgebra.printing.sreprprinter.IndentedSReprPrinter(cache=None, settings=None)[source]

Bases: qalgebra.printing.base.QalgebraBasePrinter

Printer for rendering an expression in such a way that the resulting string can be evaluated in an appropriate context to re-instantiate an identical object, using nested indentation (implementing srepr(expr, indented=True)

sympy_printer_cls

alias of qalgebra.printing.sreprprinter.IndentedSympyReprPrinter

emptyPrinter(expr)[source]

Fallback printer