Sure, it's not a language to write a web browser or game engine in. And it is slow. But it has some very strong niches outside of ML/Data science. Personally, I love it. To each their own.
Python's pre-declared constants are kinda weird
81–90 of 234 posts
Re: Python's pre-declared constants are kinda weird
#82Python is awful. There are so many one offs in libraries, none agree on a style, it’s slow, and it’s way too easy to do the wrong thing. I often work with data scientists and have to productionize their jupyter notebooks which is pure suboptimal hell. I guess it must be a good easy learning curve for research/scratchpad
Have you tried using `uv`'s newer tools? They help a lot e.g. with linting speed, lock management, package dependency separation, correct python version mgmt and no need to fudge with venv.
Re: Python's pre-declared constants are kinda weird
#83Python is awful. There are so many one offs in libraries, none agree on a style, it’s slow, and it’s way too easy to do the wrong thing. I often work with data scientists and have to productionize their jupyter notebooks which is pure suboptimal hell. I guess it must be a good easy learning curve for research/scratchpad
I'm fine with the language. I just hate that you can't do import numpy==1.5.4 and the code gets exactly the version it wants.
And it's weird how you import files. They're dot-separated packages that resemble file structure but not exactly. NodeJS has a self-explanatory require("./foo.js") or "../foo.js". The newer JS `import` syntax is annoyingly different from `require` but not terrible.
Re: Python's pre-declared constants are kinda weird
#84A lot of Python design decisions have felt weird and off to me but they’ve long justified it by saying that it’s those little ugly design choices that make the language so usable and effective in practice compared to more well-designed languages that hardly anybody uses. I’m not enough of an expert to clearly say if that’s really true, but imo, there’s a repeated pattern of slightly weirdly designed languages becomin…
JS is a lot less weird than Python. And Python is what I started with and continue to use half the time. The article missed the most common one, __name__ == "__main__" like wtf
Re: Python's pre-declared constants are kinda weird
#85Could this be so that the interpreter don't inadvertently manipulate them or pass them to a function? param=None and param="" can be very different.
Re: Python's pre-declared constants are kinda weird
#86Earlier quoted context omitted.
JS is a lot less weird than Python. And Python is what I started with and continue to use half the time. The article missed the most common one, __name__ == "__main__" like wtf
I’m not a regular JS user and haven’t touched the language in a long time, but I remember a (popular?) website for teaching modern JavaScript mentioned that some aspect of the function/macro that returns the type of an object was just plain wrong in a specific and important case. This was years ago however, so maybe the problem isn’t there anymore. Anyhow, I added JS to the list mainly because it is known as a badly…
Re: Python's pre-declared constants are kinda weird
#87Took me down some rabbit holes, but interesting to see the chatter about the fix here:
https://github.com/python/cpython/issues/80233
Initially you could reassign True,False but that was verboten with the switch to python 3! The walrus operator was the one simply an oversight.
https://python-history.blogspot.com/2013/11/story-of-none-tr...
Explanation from Guido himself
Re: Python's pre-declared constants are kinda weird
#88Earlier quoted context omitted.
Scripting languages are awful. Python is one of the nicest scripting languages.
Holy 2000s! Are we really still doing “programming” vs “scripting”?
Re: Python's pre-declared constants are kinda weird
#89Python is awful. There are so many one offs in libraries, none agree on a style, it’s slow, and it’s way too easy to do the wrong thing. I often work with data scientists and have to productionize their jupyter notebooks which is pure suboptimal hell. I guess it must be a good easy learning curve for research/scratchpad
I'm fine with the language. I just hate that you can't do import numpy==1.5.4 and the code gets exactly the version it wants.
https://packaging.python.org/en/latest/specifications/inline...
Re: Python's pre-declared constants are kinda weird
#90Earlier quoted context omitted.
I’ll never not be bitter than Python “won” the scripting language war over Ruby, more or less just because someone did a bit of AI work in it first and it took over that space by default. Ruby has such a nice holistic consistency to it. With a few exceptions, it feels like it was conceived of by one person with a core idea in mind. Python feels like a mess.
Python's strength is that it's easy to make C libs work in it. That's also why CPython is de facto the only Python implementation and stuff like PyPy never took off.
SWIG[0] makes working with C libraries trivial for over a dozen programming languages; Perl, Python, and Ruby included.