You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your awesome works on the pythonic design pattern, I'm reviewing some strategies in the design patterns. However, I tried your first abstract_factory.py random. seed(1234) in the main function will not take effect in doctest random. choice(), and it returns fake random depend on machine time or some other kind of random parameter.
I tried to fix this problem by this
random.seed(1234)
shop = PetShop(random_animal)
then you can get the same result every time you rerun it.
The text was updated successfully, but these errors were encountered:
Thanks for your awesome works on the pythonic design pattern, I'm reviewing some strategies in the design patterns. However, I tried your first abstract_factory.py
random. seed(1234)
in the main function will not take effect in doctest random. choice(), and it returns fake random depend on machine time or some other kind of random parameter.I tried to fix this problem by this
then you can get the same result every time you rerun it.
The text was updated successfully, but these errors were encountered: