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

Programmer Humor

19551 readers
525 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
[–] bjorney@lemmy.ca 10 points 8 months ago (1 children)

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

[–] mox@lemmy.sdf.org 7 points 8 months ago* (last edited 8 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."

[–] Ephera@lemmy.ml 6 points 8 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...

[–] bjorney@lemmy.ca 1 points 8 months ago (1 children)

Python 3.12's compiler tells you to fuck off

[–] Ephera@lemmy.ml 1 points 8 months ago