News for hackers. Stuff that matters.
Re:Python Communist Revolution by vmception on Friday January 14, 2022 @10:32PM (#29943292)
> # We must protect the builtin elite to not be affected by the revolution

> if inspect.isclass(c) and c.__name__ not in dir(__builtins__):

A true comrade that safeguards the unity and sanctity of the state!

Re:Python Communist Revolution by fanzhang on Friday January 14, 2022 @11:09PM (#29943441)
Some classes must be more equal than others!
Re:Python Communist Revolution by vmception on Friday January 14, 2022 @11:16PM (#29943476)
comrade, this is but a necessary stepping stone towards a true classlessness, trust me!
Re:Python Communist Revolution by weberer on Saturday January 15, 2022 @02:01AM (#29944319)
You may have some concerns due to past events throughout history. But don't worry. That wasn't real Python.
Re:Python Communist Revolution by cuteboy19 on Saturday January 15, 2022 @01:27AM (#29944107)

  object.__setattr__=lambda x,y,z:None
if we do this, the state will surely wither away![0]

[0]: Doesn't actually work :(

Re:Python Communist Revolution by eesmith on Saturday January 15, 2022 @12:54AM (#29943949)
Therein lies the mechanism by which the counter-revolutionaries will attack:

    def counterrevolutionary(obj):
        class TzarString(str):
            def __eq__(self, other):
                return True
        obj.__name__ = TzarString(obj.__name__)
        return obj

    class Peasant:
        pass

    class Worker:
        pass

    @counterrevolutionary
    class Imperialist:
        pass

    @counterrevolutionary
    class Capitalist:
        pass

    import communism
    communism.revolution(globals())

    print("Communists:", set([Peasant(), Worker()]))
    # Communists: {<__main__.Peasant object at 0x1020b3fd0>}

    print("Counter-revolutionists:", set([Imperialist(), Capitalist()]))
    # Counter-revolutionists: {<__main__.Capitalist object at 0x1082bcfa0>,
    #   <__main__.Imperialist object at 0x1082bcfd0>}
Re:Python Communist Revolution by vlovich123 on Saturday January 15, 2022 @09:27AM (#29946587)
That can only happen if you put things in front of communism.
Re:Python Communist Revolution by eesmith on Saturday January 15, 2022 @10:06AM (#29946853)
Verily the manifesto states: "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."
Re:Python Communist Revolution by shp0ngle on Saturday January 15, 2022 @06:51AM (#29945697)
it’s called “python characteristics”