Hacker News new | ask | show | jobs
by alatkins 3802 days ago
Shame that you write off an entire language from this trivial experience.
2 comments

I'm a Ruby guy that has tried Python several times. My takeaway is always that Python is beautiful and wonderful, but it just has all of these tiny little annoyances that build up and make me rage quit. Exiting out of the REPL is one of these things. I guess I spend so much time working with, and get so much work done in, IRB that anything that trips me up in a REPL just gets under my skin.

I really, really want to like Python, but I just can't seem to stay with it long enough to work through all of the "weird" stuff. :/

I became a Ruby guy. It's like Python, but with less __self__'s, and insignificant whitespace. ;)
Starting to mess with python for first time (did hello world yesterday).

_____this is so offputting______

But otherwise language seems cool

I think they did something to fix it, but back when I was investigating Python, it was useful to pass references to yourself to everything for some reason, so every method passed like __self__ to itself, it seemed like __self__'s were everywhere. Coupled with how fucking ugly (opinion, of course) double-underscored variable names are, it just did not give me a great impression.
You're wrong and you confuse two different things.

So called "magic" methods, which are called by Python in various circumstances, are surrounded by double underscores. One of such methods is __init__, which works as an initializer for newly created objects.

The other thing is that all methods, unless otherwise specified, take a pointer to the current object as a first argument. So when defining an initializer that takes no arguments from the user you write:

    def __init__(self): # etc.
I think only __init__ and __name__ are widely used in Python, all the other such methods are very special purpose and very rarely used outside of deep library code.

BTW: Being "ugly" or not is not the best characteristic you can base your opinion of a language on.