[Python-ideas] An Everything singleton

Serhiy Storchaka storchaka at gmail.com
Tue Feb 18 20:07:07 CET 2014


This crazy idea is inspired by a discussing in Python-Dev which should 
be here.

Currently we have a None singleton which representing nothing and raises 
an exception in almost all operations (except equality, etc). What about 
introducing its antonym, an Everything singleton (the name is 
discussable), which newer raises an exception in any operation, but 
returns consistent value?

 >>> Everything + 2
2
 >>> Everything < 3
True
 >>> Everything * 'foo'
'foo'



More information about the Python-ideas mailing list