#8283: A better Carmichael lambda function
---------------------------------------------+------------------------------
Reporter: wdj | Owner: mvngu
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.3.4
Component: cryptography | Keywords:
Author: Yann Laigle-Chapuy | Upstream: N/A
Reviewer: David Joyner, Minh Van Nguyen | Merged:
Work_issues: |
---------------------------------------------+------------------------------
Changes (by newvalueoldvalue):
* reviewer: => David Joyner, Minh Van Nguyen
* milestone: => sage-4.3.4
* author: => Yann Laigle-Chapuy
Comment:
Replying to [comment:2 wdj]:
> Okay with me. Minh, what do you think?
I agree with Yann's rewrite. It's much more compact than the previous
version. However, I have attached the reviewer patch
[http://trac.sagemath.org/sage_trac/attachment/ticket/8283/trac_8283-reviewer.patch
trac_8283-reviewer.patch], whose changes include:
* Remove the import statements
{{{
from sage.rings.arith import factor
from sage.structure.element import generic_power
}}}
These import statements are no longer required due to Yann's rewrite of
the Carmichael lambda function.
* Move the import statement
{{{
import sage.rings.integer
}}}
to the module preamble, so that it now reads
{{{
from sage.rings.integer import Integer
}}}
This has the effect of importing only what is required, i.e. the class
`Integer`, instead of importing the whole module `sage.rings.integer`.
* Some typo fixes.
* Clean up à la [http://www.python.org/dev/peps/pep-0008/ PEP8].
* Removing a redundant `lambda` construct by replacing
{{{
lambda x: int(x)
}}}
with the more compact
{{{
int
}}}
Only my patch needs review by anyone but me. If it's OK, then the whole
ticket gets a positive review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8283#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.