Weighted graph

Pythonicity gripe: in Python, there's only one "False" and one "True" - so we compare by saying "x is False" or "x is True", not "x == False".