On Saturday, October 20, 2012 11:30:03 AM UTC-4, Sebastien Gouezel wrote:
>
> When trying to latex-print symbolic functions, I have seen the following 
> weird behavior: 
>
> sage: P=function('P',x) 
> sage: latex(P(x=sin(0))) 
> Traceback (click to the left of this block for traceback) 
> ... 
> AttributeError: 'int' object has no attribute '_latex_' 
>
> The superficial reason for this behavior is that, if a symbolic function 
> has arguments without a _latex_ attribute, then its latex printing 
> fails. This is easy to fix, I have written a (very easy to review) patch 
> in TRAC 13632. 
>

Nice.  I've put a couple (possibly silly) comments there.
 

>
> However, the deeper reason is that, even when 0 is a sage integer, 
> sin(0) is a Python integer: 
>
> sage: type(sin(0)) 
> <type 'int'> 
>
> I was wondering if this behavior was by design, or how it could be fixed. 
>

Not by design.  I could have sworn that we already had some ticket open for 
this (and had fixed some cases)... oh yeah, 
http://trac.sagemath.org/sage_trac/ticket/10133 .  Help is welcome!  Looks 
like the fix isn't too bad, according to the notes there.

- kcrisman

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to