Skip to content

Commit 9646f52

Browse files
committed
Add doctest for pari_version()
1 parent 5ca809c commit 9646f52

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cypari2/pari_instance.pyx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,8 +1026,16 @@ cdef class Pari(Pari_auto):
10261026
print("PARI stack size set to {} bytes, maximum size set to {}".
10271027
format(self.stacksize(), self.stacksizemax()))
10281028

1029-
def pari_version(self):
1030-
return str(PARIVERSION)
1029+
@staticmethod
1030+
def pari_version():
1031+
"""
1032+
Return a string describing the version of PARI/GP.
1033+
1034+
>>> from cypari2 import Pari
1035+
>>> Pari.pari_version()
1036+
'GP/PARI CALCULATOR Version ...'
1037+
"""
1038+
return to_string(PARIVERSION)
10311039

10321040
def init_primes(self, unsigned long M):
10331041
"""

0 commit comments

Comments
 (0)