On Sun, May 22, 2016 at 3:16 AM, Volker Braun <vbraun.n...@gmail.com> wrote:
> PS: I'd be more than happy to get rid of the special casing for
> pretty_print, there is no reason to list iterators beyond backward
> compatibility for a pretty weird use case.

+1.  There are many changes that should be made to show, and it's
relatively safe to change because it won't break computations, only
display of output to users.

For the record, here's SMC's show, which is 100% rewrite (some aspects
of it are stupid, some good, some tentative...):

https://github.com/sagemathinc/smc/blob/master/src/smc_sagews/smc_sagews/sage_salvus.py#L2346

>
>
>
> On Sunday, May 22, 2016 at 12:05:10 PM UTC+2, Volker Braun wrote:
>>
>> For historic reasons, pretty_print() of iterators lists elements:
>>
>> sage: pretty_print(iter([1,2,3]))
>> 1 2 3
>>
>> And finite fields are iterators:
>>
>> sage: isinstance(GF(2), collections.Iterator)
>> True
>>
>>
>>
>>
>>
>> On Sunday, May 22, 2016 at 11:47:50 AM UTC+2, Daniel Krenn wrote:
>>>
>>> We have
>>>
>>> sage: show(FiniteField(2))
>>> \newcommand{\Bold}[1]{\mathbf{#1}}0 1
>>>
>>> which is the list of elements and not $F_2$ (what I would expect).
>>>
>>> However, the LaTeX-representation is fine:
>>>
>>> sage: latex(FiniteField(2))
>>> \Bold{F}_{2}
>>>
>>> Note that on SMC show behaves differently and a typeset $\mathbb{F}_2$
>>> is displayed. (CC to sage-cloud because of this.)
>>>
>>> This is ticket http://trac.sagemath.org/ticket/20652
>>>
>>> Can someone bring some light in this strange behaviour?
>>>
>>> Best
>>>
>>> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to