Posted inUncategorized

Python communist revolution

A man once said to abolish the classes or something like that. Unfortunately, it is impossible to abolish class in python without breaking the language, so we do the next best thing: we consider that all classes are born equal1.

Use this module to unite all classes, and initiate the global communist revolution2:

import communism

class OurClass1:
pass
class OurClass2:
pass

communism.revolution(globals())

# As all classes are equal (in __hash__ and in __eq__)
# This is why you cannot put more than one object in any Set or Dict
print(set([OurClass1(), OurClass2(), OurClass2()]))
# >> {}`

— source [boycott] github.com

[you could avoid github. it is a symbol of slavery.]

Nullius in verba


Leave a Reply

Your email address will not be published. Required fields are marked *