On 2016-10-12 13:39, Jori Mäntysalo wrote:
> More about this: In posets.py there is
> elements = D.topological_sort()
> except Exception:
> raise ValueError("Hasse diagram contains cycles.")
> and that should be "except TypeError", as that is what
> .topological_sort() raises from DiGraph that is not acyclic.
> But should a function without parameters like foo.bar() ever raise
> TypeError? If we can run that, then the object foo is of the right type
> and has bar()-function. Or where goes the limit between TypeError and
> ValueError, i.e. what we mean by 'type' -- is DAG a "type" or just a
> DiGraph with some special properties?
There could be a ContainsCycleError which has RuntimeError as a base...
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.