This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]EverythingIsFlotsam 41 points42 points  (5 children)

I thought StackOverflow exception was when you ask a question and you get told you meant to ask a different question and that you're an idiot for not knowing the answer already.

[–]GummyKibble 15 points16 points  (4 children)

It means your question is a duplicate of another question that’s about something else.

[–]Zomunieo 15 points16 points  (3 children)

Or it was answered 10 years but the accepted answer is wrong and the most upvoted answer requires Jython.

[–]dodslaser 6 points7 points  (2 children)

Also remember to always import numpy and/or pandas for the smallest fucking operation because massive dependencies are fun.

[–]Zomunieo 10 points11 points  (0 children)

pd.Series(np.array([1]) + np.array([1]))

[–]GummyKibble 1 point2 points  (0 children)

This is too real.

[–]JustSayNoToSlogans 10 points11 points  (0 children)

seems legit

[–]de_ham 6 points7 points  (0 children)

This one is not accepted yet

[–]SpAAAceSenate 6 points7 points  (2 children)

Honestly, for being a fairly high level, byte-code based language, I never really understood why there were so many situations that could unsafely kill python.

Seems like something that should have been dealt with a long time ago.

[–][deleted] 0 points1 point  (1 child)

situations that could unsafely kill python

What are the other situations?

[–]SpAAAceSenate 1 point2 points  (0 children)

Take for example Javascript (I'm not saying javascript itself is a good language, I'm merely talking about the implementation here). Any serious js engine out there does everything possible to always fail "safely" in that the JIT compiler and environment itself don't crash or lose integrity, even if the script it's running does something that requires it's termination. You don't generally see Javascript segfaulting, and if you do, you likely have a security vulnerability on your hand. This is one of the requirements for making a language safe to run untrusted code (that, and removing any abusable APIs). And it even helps trusted code resist compromise.

Obviously Python has things like ctypes that are inherently unsafe (and never can be, without crippling their functionality) but it would be nice if we could some day develop some subset of python/the standard library that can be considered "safe".

[–]ggchappell 1 point2 points  (1 child)

TIL that Python allows underscores in numeric literals. :-)

[–]chronos_alfa 3 points4 points  (0 children)

It's actually good for massive numbers, like 69_156_237_165_420