Status: Valid
Owner: ----
Labels: Type-Defect Priority-High Matching Milestone-Release0.7.3
New issue 3550 by ronan.l...@gmail.com: patternify() creates broken objects
http://code.google.com/p/sympy/issues/detail?id=3550
In principle, the whole concept of replacing arbitrary objects with
Variable objects cannot work, because they cannot provide the same methods
as the objects they are supposed to replace. For instance:
In [7]: patternify(MatrixSymbol('x', n,n), 'x')
Out[7]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/ronan/dev/sympy/<ipython-input-7-fc374d16eef5> in <module>()
----> 1 patternify(MatrixSymbol('x', n,n), 'x')
<snip>
/home/ronan/dev/sympy/sympy/printing/pretty/pretty.pyc in
_print_Symbol(self, e)
59
60 def _print_Symbol(self, e):
---> 61 symb = pretty_symbol(e.name)
62 return prettyForm(symb)
63
/home/ronan/dev/sympy/sympy/printing/pretty/pretty_symbology.pyc in
pretty_symbol(symb_name)
444 return symb_name
445
--> 446 name, sups, subs = split_super_sub(symb_name)
447
448 # let's prettify name
/home/ronan/dev/sympy/sympy/printing/conventions.pyc in
split_super_sub(text)
27 supers = []
28 subs = []
---> 29 while pos < len(text):
30 start = pos + 1
31 if text[pos:pos + 2] == "__":
TypeError: object of type 'Variable' has no len()
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.