Use optional third argument as edge attribute.

This is probably easiest way to include edge weight. Unless you guys have been thinking about some other ways? I also wanted to add one more argument for default edge attribute value..probably I will do that in another patch.