Inspired by a bug from code review today, please enjoy this utterly cursed expression:
if True is ('mystr' in list_of_strings): ....
@padraic_padraic Why is this a bug? True is a singleton, so this should work just fine.
@deshipu Oh no, the bug was:
if 'mystring' is in list_of_strings
And that was what made me realise that snippet was the 'correct' way of using is in the test
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!