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
"There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining eq(), one should also define ne() so that the operators will behave as expected."
So in python 2.7.x one cannot do the following
browser = Browser()
browser.visit("http://www.google.com")
if browser.status_code != 200:
print("ERROR")
This however will work in python 3.x because the data model says ne will automatically invert the return code of eq
Splinter StatusCode didnt implement __ne()__ causing issues with Python
2.7.x. We will use a patched version of splinter for issue 460 [1] available
as pull request 461 [2].
[1] cobrateam/splinter#460
[2] cobrateam/splinter#461
Quoting to the 2.7.x data model [1]
"There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining eq(), one should also define ne() so that the operators will behave as expected."
So in python 2.7.x one cannot do the following
browser = Browser()
browser.visit("http://www.google.com")
if browser.status_code != 200:
print("ERROR")
This however will work in python 3.x because the data model says ne will automatically invert the return code of eq
[1] https://docs.python.org/2/reference/datamodel.html
The text was updated successfully, but these errors were encountered: