Prim's algorithm

I would assign `None` instead of `-1`.

The rational is - it is generally bad to make a variable to hold a multiple types of data, because it makes reasoning around code harder. `spanningparent` is either integer (-1) or `vertex` object. if you need a value to represent lack-of-value, you should be using `None` (which is equivalent to `null` in other programming language).