Hacker News new | past | comments | ask | show | jobs | submit login

I guess they wanted to raise an exception if the graph has cycles, while at the same time still be able to use the object partially. Then the constructor can not raise.

Also, you don't have to call is_active(), the object itself is convertible to bool. Not sure if that is an improvement.

graphlib is definitely underwhelming at the moment. A standard Python vocabulary for graphs would be nice.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: