This fixes a rather subtle bug that was inadvertently introduced by #27.
Related: #4
There is a check whether the variable interactions is equal to 1. Currently, this statment also passes if interactions is equal to True, but this is unintentional. It's a rather nuanced as a bool is a subclass of an int, so isinstance(interactions, int) is not enough.
Side fun fact: this comparison was previously achieved with interactions is 1, which is not safe but may work some of the time depending on the python implmentation. Here's a fun python phenomenon:
>>> a = 1
>>> b = 1
>>> a is b
True
>>> a = 99999999
>>> b = 99999999
>>> a is b
False
This fixes a rather subtle bug that was inadvertently introduced by #27.
Related: #4
There is a check whether the variable
interactions
is equal to1
. Currently, this statment also passes ifinteractions
is equal toTrue
, but this is unintentional. It's a rather nuanced as abool
is a subclass of anint
, soisinstance(interactions, int)
is not enough.Side fun fact: this comparison was previously achieved with
interactions is 1
, which is not safe but may work some of the time depending on the python implmentation. Here's a fun python phenomenon: