[New-bugs-announce] [issue13603] Add prime-related functions to Python

maniram maniram report at bugs.python.org
Thu Dec 15 04:35:22 CET 2011


New submission from maniram maniram <maniandram01 at gmail.com>:

It would be nice to have prime-related and number theory functions in a new module or some existing module (like math).
like this:
>>> import prime
>>> prime.isprime(7)
True
>>> prime.isprime(35)
False
>>> prime.primerange(10,18)
(11,13,17)
>>> prime.isperfect(6) #Is 6 a perfect number (http://en.wikipedia.org/wiki/Perfect_number)
True
>>> prime.factorize(60)
{2:2,3:1,5:1} #2**2 * 3**1 * 5**1

----------
components: Library (Lib)
messages: 149492
nosy: maniram.maniram
priority: normal
severity: normal
status: open
title: Add prime-related functions to Python
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13603>
_______________________________________


More information about the New-bugs-announce mailing list