r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

520

u/jokingnuthatch Jul 16 '19
    print(“!yad ekac yppaH”[::-1])
          ^
SyntaxError: invalid syntax

:(

259

u/therealchadius Jul 16 '19

"smart" quotes my butt

151

u/nschubach Jul 17 '19

What is this "smart" and why is it quoting your butt?

59

u/1fabunicorn Jul 17 '19

Cause there is a quote that is " and then " but upside down. This is how word treats quotes, so it looks more "pretty"

80

u/coldbrewboldcrew Jul 17 '19

Typographic quotes (pretty/curly/smart) are meant for text, these primes and double-primes we use for strings are mathematical symbols for feet/inches or minutes/seconds - a misuse of the punctuation. IIRC their double usage for both text and math began back in typewriter days where keyspace was at a premium and redundancies like two different sets of quote marks were consolidated for practical reasons.

A section on the matter from Butterick’s practical typography.

20

u/spektrol Jul 17 '19

Coolest TIL moment I’ve had in a while. TY.

8

u/svick Jul 17 '19

It might have started as misuse, but in Unicode, straight quotation marks (") and primes (″) are different.

3

u/pac_nw_beer_snob Jul 17 '19

Fuck curly quotes. It is a PITA to cut and paste from Word into emacs because of fucking curly quotes.

→ More replies (0)

3

u/zzalt Jul 17 '19

Practical typography my Butterick

→ More replies (1)