weird output: show of FiniteField

78 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Daniel Krenn

ungelesen,
22.05.2016, 05:47:5022.05.16
an sage-...@googlegroups.com, sage-...@googlegroups.com
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

Volker Braun

ungelesen,
22.05.2016, 06:05:1022.05.16
an sage-devel, sage-...@googlegroups.com
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

Volker Braun

ungelesen,
22.05.2016, 06:16:4322.05.16
an sage-devel, sage-...@googlegroups.com
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.

William Stein

ungelesen,
22.05.2016, 11:45:1022.05.16
an sage-devel, sage-cloud
On Sun, May 22, 2016 at 3:16 AM, Volker Braun <vbrau...@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+...@googlegroups.com.
> To post to this group, send email to sage-...@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)

Volker Braun

ungelesen,
30.05.2016, 09:51:0330.05.16
an sage-devel, sage-...@googlegroups.com


On Sunday, May 22, 2016 at 11:47:50 AM UTC+2, Daniel Krenn wrote:

Daniel Krenn

ungelesen,
30.05.2016, 09:57:4230.05.16
an sage-...@googlegroups.com
Why was
On 2016-05-30 15:51, Volker Braun wrote:
> This is now http://trac.sagemath.org/ticket/20711

created and code not attached to the existing

> On Sunday, May 22, 2016 at 11:47:50 AM UTC+2, Daniel Krenn wrote:
> This is ticket http://trac.sagemath.org/ticket/20652
> <http://trac.sagemath.org/ticket/20652>

?

Volker Braun

ungelesen,
30.05.2016, 10:50:3930.05.16
an sage-devel
Ah forgot about the existing ticket...
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten