Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Latest commit

 

History

History
38 lines (26 loc) · 1.44 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.44 KB

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()]))
# >> {<__main__.OurClass1 object at 0x00000235D216E140>}`

Installation

In our terminal:

  • git clone https://github.com/jokteur/python_communism.git
  • cd python_communism/
  • pip install .

Now you have access to communism!

TL;DR

Quick summary of the module:

click to see summary

Footnotes

  1. Well, not all classes are born equal. It is not possible to do a complete communist revolution without breaking the language. This is why there are elites (like the __builtins__) which are more equal than all of the others.

  2. The communist revolution does not prevent future classes to be equal to all others. Classes declared after the communism.revolution() will not follow the communism rule.