#17385: Cleanup Graph.__init__ and DiGraph.__init__
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.5
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers: David Coudert
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/17385 | 3f8a98bc9caa9f64504cf2d85ce4ed39ea7ce12c
Dependencies: #17384 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: positive_review => needs_work
Comment:
Replying to [comment:5 tscrim]:
> While that's an improvement, the fastest way is to do `if x:` or `if not
x:`.
You are right... I will do the changes (but your timings are not complete
since you forgot the case `x = None`). There were occurrences at other
places in the code. The advantage I see is that, while you read it, you
know that `None` is one possible choice whereas
{{{
if not x and some_condition:
if x is False:
raise ValueError
x = False
}}}
is a bit less verbose.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17385#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.