verify_client.py: don't determine the result via equal symbol
That is wrong if using "==" to check up True of False in terms of Python semantics.
You want to use "is" to check True or False? "is" indeed would be better in this case, but I tried in both python 2.7 and python 3.6, "is" and "==" both work.
Thank you for your comments.
However, works not means using correct and will not cause collision in other conditations in this way, etc... Actually, binary operater against True or False is totally wrong since ‘is’ and ‘==‘ is completely different considering check for equality or equivalent object. I’d recommend you to read Pep8 as a start to learn how to write code in Pythonic way.
在 2018年6月14日,10:40,Kechen Hu <[email protected]mailto:[email protected]> 写道:
You want to use "is" to check True or False? "is" indeed would be better in this case, but I tried in both python 2.7 and python 3.6, "is" and "==" both work.
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ApolloAuto/apollo/issues/4506#issuecomment-397150610, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjCFy8CIV2L12SXJFhDssZBlRPWBO41-ks5t8cz_gaJpZM4Ulo_b.
Currently closing this issue as it appears to be resolved.