pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.5k stars 525 forks source link

Use a set instead of a list to mark done states #418

Closed thedrow closed 4 years ago

thedrow commented 4 years ago

Since we don't care about duplicates and checking for membership in set is O(1) on average while on a list it should be O(N) I've changed done to be a set instead of a list.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.001%) to 98.561% when pulling df1caa107f774eba099a648f5d06bb31608ce1e6 on thedrow:patch-1 into f7cc995c4e088974d49371d9583d9bcb3f2a731d on pytransitions:master.