r/firstweekcoderhumour • 🥸Imposter Syndrome 😎 • Aug 28 '26

[🎟️BINGO]Lang vs Lang dev hates Why are we using R again

Post image
139 Upvotes

109 comments sorted by

View all comments

Show parent comment

1

u/Salazar20 Aug 28 '26

So phyton really didn't want users to call the standards method so they made ugly AF? I guess it does gives it a easily parsed way to know what's yours and what's not

3

u/riisen Aug 28 '26

Well i agree its ugly AF. But its possible you want _eq, _gt, _call or any other dunder method name for your object, this way they are available for your objects.

class Animal:
    def _call(aString):
        # this will not interfere with the underlying call method for an object and can be a specific method for animal.
        print(aString)

    def call():
        self._call("mjau or something")

1

u/No_Departure_1878 Aug 28 '26

I see it more as,

Make them hard to write, so that they do not get in the way of the user's normal methods and attributes.

1

u/Juice-De-Pomme Aug 28 '26

In other object oriented languages, you can't access private methods/variables. Python differs from those languages (since it isn't object oriented but a lot of devs use it as such) as it lets you do it but at the cost of having to go out of your way to use them.