chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
deed09b
)
mp.c: Describe `MP' and `GF' conversion semantics.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Nov 2019 18:56:34 +0000
(18:56 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Nov 2019 22:17:32 +0000
(22:17 +0000)
mp.c
patch
|
blob
|
blame
|
history
diff --git
a/mp.c
b/mp.c
index b3ab0d254fd59b182206eb3483765a8d587c71a0..62d2dfeee29a7d6323128ab2317b1303a8742ee6 100644
(file)
--- a/
mp.c
+++ b/
mp.c
@@
-892,11
+892,15
@@
static PyTypeObject mp_pytype_skel = {
/* @tp_doc@ */
"Multiprecision integers, similar to `long' but more efficient and\n\
/* @tp_doc@ */
"Multiprecision integers, similar to `long' but more efficient and\n\
-versatile. Support all the standard arithmetic operations.\n\
+versatile. Support all the standard arithmetic operations, with\n\
+implicit conversions from `PrimeFilter', and other objects which\n\
+convert to `long'.\n\
\n\
Constructor MP(X, radix = R) attempts to convert X to an `MP'. If\n\
X is a string, it's read in radix-R form, or we look for a prefix\n\
\n\
Constructor MP(X, radix = R) attempts to convert X to an `MP'. If\n\
X is a string, it's read in radix-R form, or we look for a prefix\n\
-if R = 0. Other acceptable things are ints and longs.\n\
+if R = 0. Other acceptable things are field elements, elliptic curve\n\
+points, group elements, Python `int' and `long' objects, and anything\n\
+with an integer conversion.\n\
\n\
Notes:\n\
\n\
\n\
Notes:\n\
\n\
@@
-2085,7
+2089,9
@@
operations.\n\
\n\
Constructor GF(X, radix = R) attempts to convert X to a `GF'. If\n\
X is a string, it's read in radix-R form, or we look for a prefix\n\
\n\
Constructor GF(X, radix = R) attempts to convert X to a `GF'. If\n\
X is a string, it's read in radix-R form, or we look for a prefix\n\
-if R = 0. Other acceptable things are ints and longs.\n\
+if R = 0. Other acceptable things are field elements, elliptic curve\n\
+points, group elements, Python `int' and `long' objects, and anything\n\
+with an integer conversion.\n\
\n\
The name is hopelessly wrong from a technical point of view, but\n\
but it's much easier to type than `p2' or `c2' or whatever.\n\
\n\
The name is hopelessly wrong from a technical point of view, but\n\
but it's much easier to type than `p2' or `c2' or whatever.\n\