From: yoni206 Date: Mon, 23 Aug 2021 17:01:39 +0000 (+0300) Subject: Adding parameters to Datatype python API documentation (#7027) X-Git-Tag: cvc5-1.0.0~1350 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9fd9a24da615fab9e23a5a48fbad023150bef61;p=cvc5.git Adding parameters to Datatype python API documentation (#7027) --- diff --git a/src/api/python/cvc5.pxi b/src/api/python/cvc5.pxi index 7c9a70642..f5dca55c7 100644 --- a/src/api/python/cvc5.pxi +++ b/src/api/python/cvc5.pxi @@ -100,7 +100,6 @@ cdef class Datatype: self.solver = solver def __getitem__(self, index): - """Return a constructor by index or by name.""" cdef DatatypeConstructor dc = DatatypeConstructor(self.solver) if isinstance(index, int) and index >= 0: dc.cdc = self.cd[( index)] @@ -111,28 +110,42 @@ cdef class Datatype: return dc def getConstructor(self, str name): - """Return a constructor by name.""" + """ + :param name: the name of the constructor. + :return: a constructor by name. + """ cdef DatatypeConstructor dc = DatatypeConstructor(self.solver) dc.cdc = self.cd.getConstructor(name.encode()) return dc def getConstructorTerm(self, str name): - """:return: the term representing the datatype constructor with the given name (see :cpp:func:`Datatype::getConstructorTerm() `).""" + """ + :param name: the name of the constructor. + :return: the term representing the datatype constructor with the given name (see :cpp:func:`Datatype::getConstructorTerm() `). + """ cdef Term term = Term(self.solver) term.cterm = self.cd.getConstructorTerm(name.encode()) return term def getSelector(self, str name): - """Return a selector by name.""" + """ + :param name: the name of the selector.. + :return: a selector by name. + """ cdef DatatypeSelector ds = DatatypeSelector(self.solver) ds.cds = self.cd.getSelector(name.encode()) return ds def getName(self): + """ + :return: the name of the datatype. + """ return self.cd.getName().decode() def getNumConstructors(self): - """:return: number of constructors.""" + """ + :return: number of constructors in this datatype. + """ return self.cd.getNumConstructors() def isParametric(self):