Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding basic types (list, dict ,etc) to the sympy profile.

This brings the sympy profile into synch with isympy.
  • Loading branch information...
commit 09b275ebbfdf5d85fa0e33ea9906b776f3d52f44 1 parent c7c711b
@ellisonbg authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 IPython/extensions/sympyprinting.py
View
5 IPython/extensions/sympyprinting.py
@@ -55,6 +55,10 @@ def load_ipython_extension(ip):
global _loaded
if not _loaded:
plaintext_formatter = ip.display_formatter.formatters['text/plain']
+
+ for cls in (object, tuple, list, set, frozenset, dict, str):
+ plaintext_formatter.for_type(cls, print_basic_unicode)
+
plaintext_formatter.for_type_by_name(
'sympy.core.basic', 'Basic', print_basic_unicode
)
@@ -63,6 +67,7 @@ def load_ipython_extension(ip):
)
png_formatter = ip.display_formatter.formatters['image/png']
+
png_formatter.for_type_by_name(
'sympy.core.basic', 'Basic', print_png
)
Please sign in to comment.
Something went wrong with that request. Please try again.