Inspired by a bug from code review today, please enjoy this utterly cursed expression:
if True is ('mystr' in list_of_strings):
@padraic_padraic truly amazing, this gave the idea of parsing python code and then adding these random cursed AST transformations to the code and spitting it back out
@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!