On Sat, 28 Jul 2018 09:47:07 +0000, Gilmeh Serda wrote: > On Tue, 24 Jul 2018 12:33:27 -0700, Tobiah wrote: > >> I'm trying to get away from things like: >> >> >>> type(thing) is type(None) > > How about: > > >>> some_thing = None > >>> type(some_thing).__str__(some_thing) > 'None' > > Equally weird, I'd say, but what the heck...
class Foo: def __str__(self): return 'None' -- Steven D'Aprano "Ever since I learned about confirmation bias, I've been seeing it everywhere." -- Jon Ronson -- https://mail.python.org/mailman/listinfo/python-list