On Thu, 18 May 2017, david.coud...@inria.fr wrote:

A method like `Graph().is_bipartite(certificate=False)` returns either
``True``or ``False`` when ``certificate==False``, or a tuple `(bool, dict)`
when ``certificate==True``. What would be the recommended writing style for
the output block ?

My suggestion would be

OUTPUT:

- If ``certificate=True`` return only True or False.
- If ``certificate=False`` return either
  * (True, XX), where XX is...
  * (False, XX), where XX is...

and when there is only one-way certificate,

OUTPUT:

- If ``certificate=True`` return only True or False.
- If ``certificate=False`` return either (True, None) or (False, XX),
  where XX is...

--
Jori Mäntysalo

Reply via email to