Closed iRhonin closed 2 years ago
>>> l = ['l', 'm', 'n']
>>> if True and not 's' in l:
... print('works')
...
works
>>> not 's' in l
True
How are the above two lines incorrect?
Actually it is not incorrect but the best practice is to write 's' not in l
instead of not 's' in l
.
Unrelated as this issue isn’t about best practice. OP opened this as a bug. However, this is not a bug.
Never knew about that being best practice. Both work anyway. I'm working on a rewrite of this in another branch so will have a look at it their.
Yeap both are the same.
I think this two line is obviously incorrect in rpc.py file (line 97 and 100):