Serhiy Storchaka <[email protected]> added the comment:
On other hand, beginners are confused even by chained "==". There are regular
reports about this on the tracker and questions on Python-related resources.
I have found the chained "in" is useful in the following case
len(string) >= 2 and string[0] == string[-1] in ("'", '"')
for testing if the string is quoted with a single or double quotes.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32055>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com