On Mon, Sep 15, 2014 at 9:58 AM, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> Dear sage-devel,
>
> we all know that deprecations are good when you remove some functionality (a
> function, a keyword...). It's not clear to me if there is any deprecation
> policy for *changing* functionality.

I think it should depend on the documented API.  In this case...

>
> In this case, I am talking about this functionality:
>
> sage: x = polygen(GF(7))
> sage: k.<a> = GF(7, modulus=x-2)
> sage: k.gen()
> 1
>


... the docstring says:

Docstring: Return generator of this finite field as an extension of
its prime field.
Note: If you want a primitive element for this finite field instead,
use "multiplicative_generator()".

> The first question is: does this need a deprecation? One would argue that
> the current behaviour is a bug, but maybe some code depends on this bug (it
> is hard to imagine how though...).

I don't think it needs a deprecation, since you are not changing the
documented API.
However, if you make this change, I hope you will document it clearly
in the API, since there's probably
some application you have in mind that would depend on this new
behavior.  Then if somebody asks the
same question in five years, and once to change behavior again, then
they *can't* without a deprecation
period, because the behavior you just implemented is officially documented.

>
> And if we need a deprecation, how to do it? Add a new method "newmodulus"
> instead of "modulus" and deprecate "modulus":
>
> sage: k.<a> = GF(7, modulus=x-2)
> DeprecationWarning: the 'modulus' argument is deprecated, use 'newmodulus'
> instead which is no longer ignored for prime fields
> sage: k.<a> = GF(7, newmodulus=x-2)
> sage: k.gen()
> 2
>
> This seems silly, but I cannot think of anything better.
>
> Jeroen.
>
> --
> 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 http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
wst...@uw.edu

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to