News for hackers. Stuff that matters.
Re:The use of `class` for things that should be simple free ... by comfydragon on Thursday May 28, 2020 @07:12PM (#23344177)
That's a thing you can also do in Python:

    class MyObject:
        def doThing(self, value: str) -> None:
            # whatever
            pass

    obj = MyObject()
    obj.doThing("value!")
    MyObject.doThing(obj, "a different value!")
The only difference is that doThing is namespaced to the MyObject class.

There are no comments on this comment yet.