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
In this situation, I would intuitively expect to get a TypeError message but instead it seems that espresso automatically transforms my bool argument to 0. In a way, it is kind of expected because False in Python is used as a keyword for 0 but I can imagine that it could become a source of bugs for people with more basic knowledge of Python. I let you to decide if this a bug or a feature of espresso, although I think that it would be generally better to restrict the accepted variable types to avoid unexpected behaviors.
The text was updated successfully, but these errors were encountered:
While debugging a code I found an interesting behavior in espresso. It seems that
system.part.by_id()
acceptsbool
variables as input arguments:In this situation, I would intuitively expect to get a
TypeError
message but instead it seems that espresso automatically transforms mybool
argument to 0. In a way, it is kind of expected becauseFalse
in Python is used as a keyword for0
but I can imagine that it could become a source of bugs for people with more basic knowledge of Python. I let you to decide if this a bug or a feature of espresso, although I think that it would be generally better to restrict the accepted variable types to avoid unexpected behaviors.The text was updated successfully, but these errors were encountered: