On Sat, 26 Sep 2015, Tom Boothby wrote:
Hold on, why do you want to rule out zero? It seems like a dumb thing
to do a search at depth zero, but raising an error rather than
returning a trivial result is infuriating to a user.
I am not doing that. At first post I asked for functions to check
Hold on, why do you want to rule out zero? It seems like a dumb thing
to do a search at depth zero, but raising an error rather than
returning a trivial result is infuriating to a user.
On Sat, Sep 26, 2015 at 11:06 AM, John H Palmieri
wrote:
>
>
> On Saturday, September 26, 2015 at 10:55:57 AM
On Saturday, September 26, 2015 at 10:55:57 AM UTC-7, Jori Mäntysalo wrote:
>
> On Sat, 26 Sep 2015, Travis Scrimshaw wrote:
>
> > I would use:
> >
> > if n not in ZZ:
> >raise ValueError(...)
>
> Seems easy. But to make sure: does this work in all cases? I.e. raw Python
> ints, Sage In
On Sat, 26 Sep 2015, Travis Scrimshaw wrote:
I would use:
if n not in ZZ:
raise ValueError(...)
Seems easy. But to make sure: does this work in all cases? I.e. raw Python
ints, Sage Integers, maybe something else too? At least QQ(3) in NN seems
to work.
How about positive integers? "n-
I would use:
if n not in ZZ:
raise ValueError(...)
Best,
Travis
On Saturday, September 26, 2015 at 12:35:05 PM UTC-5, Jori Mäntysalo wrote:
>
> An example:
>
> sage: g = Graph({0:[1,2]})
> sage: list(g.breadth_first_search(0, distance='junk'))
> [0, 1, 2]
>
> This can be corrected: try: