this post was submitted on 19 Feb 2024
356 points (94.9% liked)

Programmer Humor

19149 readers
1248 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 6 months ago (1 children)

OSError: File or directory not found "C:WindowsSystem32"

[–] [email protected] 7 points 6 months ago* (last edited 6 months ago) (1 children)

Nope. From the spec:

"Unlike Standard C, all unrecognized escape sequences are left in the string unchanged, i.e., the backslash is left in the result."

[–] [email protected] 6 points 6 months ago (1 children)

This behavior is useful when debugging: if an escape sequence is mistyped, the resulting output is more easily recognized as broken.

Wow, this sentence really threw me for a moment. I had no idea how other programming languages behave.

...which makes sense, because they don't. The compiler just tells you to fuck off and that's the end of that story. I guess, they can't do that in Python...

[–] [email protected] 1 points 6 months ago (1 children)

Python 3.12's compiler tells you to fuck off

[–] [email protected] 1 points 6 months ago