Hi Mark,

On 2017-04-23, markiopp...@gmail.com <markiopp...@gmail.com> wrote:
> ...
> https://doc.sagemath.org/html/en/thematic_tutorials/structures_in_coding_theory.html
>
> *Problem 1*
> The constructor for the repetition code in repetition_code.py uses GF(2). 
> In order to avoid Error 1 (below) I needed to add the following line to 
> reptition_code.py:
> from sage.rings.finite_rings.finite_field_constructor import FiniteField as 
> GF

Most of the tutorials and doc tests are written in terms of interactive code, 
i.e., code that works on the SageMath command line (or notebook). In an 
interactive session, GF and many other things do not need to be imported. 
However, if one creates a Python module using Sage, everything of course 
needs to be imported, and also Sage's syntax such as "2^5" instead of 
"2**5" won't work.

However, the tutorial you are mentioning explicitly is about writing
files "repetition_code.py" etc, and they do *not* advise to import
what is needed. I agree with you that they should.

Best regards,
Simon

-- 
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