#13516: prime_powers doesn't work with start very well
---------------------------------+------------------------------------------
Reporter: kcrisman | Owner: was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.4
Component: number theory | Resolution:
Keywords: beginner | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Kevin Halasz | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by ppurka):
Some more nitpicks. :)
1. Don't use `==` or `!=` when comparing against `None`. See
[http://www.python.org/dev/peps/pep-0008/#programming-recommendations PEP
8].
2. When you describe the arguments `start` and `stop`, then describe the
default value too.
{{{
- ``start`` - an integer. If two inputs are given, ....
- ``stop`` - an integer (default: ``None``). An upper bound for ....
}}}
3. Please don't remove the trac numbers from the examples. They were put
there after someone fixed some bug.
{{{
sage: type(v[0]) # trac #922
}}}
4. Can you write the `TypeError` in python 3 style? Every small bit will
help in the migration to python 3 later.
{{{
raise TypeError("start must be an integer, %s is not an
integer"%start)
raise TypeError("stop must be an integer, %s is not an
integer"%stop)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13516#comment:24>
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.