News for hackers. Stuff that matters.
Re:OO in Python is mostly pointless by closed on Thursday January 28, 2021 @12:10AM (#25938456)
> Nor do I find charming the belligerent lack of any magical syntactic sugar for `self`. Does Python force you to pass it as an argument to make some kind of clever point?

On the class, you can call the method like a normal function (passing the self arg manually). Seems like a nice connection to just raw functions. Also explains how you can add methods after a class has been defined (set a function on it, whose first param is a class instance).

Re:OO in Python is mostly pointless by gorgoiler on Thursday January 28, 2021 @01:24AM (#25938865)
That’s a compelling point.

    zoo = [‘goat4’, ‘tiger7’]
    map(Pet.stroke, zoo)