File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1663,6 +1663,21 @@ static PyMethodDef methods[] = {
16631663};
16641664
16651665
1666+ PyDoc_STRVAR (mpz_doc ,
1667+ "mpz(x, /)\n\
1668+ mpz(x, /, base=10)\n\
1669+ \n\
1670+ Convert a number or string to an integer, or return 0 if no arguments\n\
1671+ are given. If x is a number, return x.__int__(). For floating-point\n\
1672+ numbers, this truncates towards zero.\n\
1673+ \n\
1674+ If x is not a number or if base is given, then x must be a string,\n\
1675+ bytes, or bytearray instance representing an integer literal in the\n\
1676+ given base. The literal can be preceded by '+' or '-' and be surrounded\n\
1677+ by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\n\
1678+ Base 0 means to interpret the base from the string as an integer literal." );
1679+
1680+
16661681PyTypeObject MPZ_Type = {
16671682 PyVarObject_HEAD_INIT (NULL , 0 )
16681683 .tp_name = "gmp.mpz" ,
@@ -1676,6 +1691,7 @@ PyTypeObject MPZ_Type = {
16761691 .tp_hash = (hashfunc ) hash ,
16771692 .tp_getset = getsetters ,
16781693 .tp_methods = methods ,
1694+ .tp_doc = mpz_doc ,
16791695};
16801696
16811697
You can’t perform that action at this time.
0 commit comments