# Ticket #10784: trac_10784-reviewer.patch

File trac_10784-reviewer.patch, 2.8 KB (added by kcrisman, 2 years ago)

Apply after initial patch

• ## sage/rings/arith.py

```# HG changeset patch
# User Karl-Dieter Crisman <kcrisman@gmail.com>
# Date 1299983430 18000
# Node ID bf39f6191fbd2dfc2e9a72f9e2307d7b9ec57ab3
# Parent  dc85f486d67d756adc9670592da863bb1c4e2f0a
Trac 10784 - minor doc fixes, add a doctest

diff -r dc85f486d67d -r bf39f6191fbd sage/rings/arith.py```
 a ##     return P + X def primes(start, stop=None, proof=None): r""" Returns an iterator over all primes between start and stop-1, r""" Returns an iterator over all primes between start and stop-1, inclusive. This is much slower than ``prime_range``, but potentially uses less memory.  As with ``next_prime``, the optional potentially uses less memory.  As with :func:`next_prime`, the optional argument proof controls whether the numbers returned are guaranteed to be prime or not. over primes. In some cases it is better to use primes than ``prime_range``, because primes does not build a list of all primes in the range in memory all at once. However, it is potentially much slower since it simply calls the ``next_prime`` function repeatedly, and ``next_prime`` is slow. INPUT: slower since it simply calls the :func:`next_prime` function repeatedly, and :func:`next_prime` is slow. INPUT: -  ``start`` - an integer lower bound for the primes -  ``stop`` - an integer (or infinity) upper (open) bound for the primes -  ``proof`` - bool or None (default: None)  If True, the function yields only proven primes.  If False, the function uses a pseudo-primality test, which is much faster for really big numbers but does not provide a proof of primality. If None, uses the global default (see :mod:`sage.structure.proof.proof`) OUTPUT: -  an iterator over primes from start to stop-1, inclusive - ``start`` - an integer - lower bound for the primes - ``stop`` - an integer (or infinity) optional argument - giving upper (open) bound for the primes - ``proof`` - bool or None (default: None)  If True, the function yields only proven primes.  If False, the function uses a pseudo-primality test, which is much faster for really big numbers but does not provide a proof of primality. If None, uses the global default (see :mod:`sage.structure.proof.proof`) OUTPUT: -  an iterator over primes from start to stop-1, inclusive EXAMPLES:: 13 17 19 sage: next(p for p in primes(10,oo)) # checks alternate infinity notation 11 """ from sage.rings.infinity import infinity