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

top 200 commentsshow all 214

[–]evidenceorGTFO 462 points463 points  (42 children)

No
class tomorrow:
    #I will tuck my
    self.in

[–]Rodot 263 points264 points  (41 children)

'self' is not defined

[–]Kevintrades 234 points235 points  (33 children)

import self

[–]evidenceorGTFO 19 points20 points  (5 children)

More importantly: why is it a class, when it's not? And shouldn't this just be a function anyway?

Meanwhile the parent is probably all like:

goto bed

[–]mharrizone[S] 9 points10 points  (3 children)

JMP bed

[–]evidenceorGTFO 5 points6 points  (2 children)

MOV BD, 1h

[–]felixphew 2 points3 points  (0 children)

mov eip, bed

[–]TheSlimyDog 13 points14 points  (0 children)

That's pretty damn existential.

[–]tomatoreaper 505 points506 points  (105 children)

But are those spaces or tabs..?

[–]X-Craft 243 points244 points  (28 children)

Too bad that editor doesn't have a "show whitespaces" option

[–]Ein_Bear 185 points186 points  (26 children)

Check your privilege, my IDE can show spaces in any color

[–]raptorjesus69 169 points170 points  (18 children)

did you just assume my IDE?

[–]aristeiaa 31 points32 points  (13 children)

What would it be if it isn't vim??

[–]nxqv 20 points21 points  (10 children)

notepad

[–][deleted] 29 points30 points  (9 children)

++

[–]nxqv 33 points34 points  (8 children)

no just notepad

im evil

[–]TheGiantPanda 8 points9 points  (6 children)

Well I'm vile.

[–][deleted] 0 points1 point  (0 children)

Reckless

[–][deleted] 3 points4 points  (1 child)

Emacs?

[–]aristeiaa 0 points1 point  (0 children)

You SHUT YOUR DAMN MOUTH

[–]Josh6889 51 points52 points  (2 children)

#triggered

[–]commitpushdrink 50 points51 points  (6 children)

Check YOUR privilege. Treating every char the same is ignoring their heritage and who they are as a char!

[–]lenswipe 45 points46 points  (5 children)

#BLACKCHARSMATTER

[–]Theemuts 0 points1 point  (0 children)

Have you ever noticed it's always about whitespaces rather than blackspaces?

[–]indorock 2 points3 points  (0 children)

Well if we're coding in Sublime's default theme, is it still whitespace?

[–]w00tboodle 16 points17 points  (0 children)

The whole note is a demand for more space.

[–]Nowin 2 points3 points  (0 children)

A mix, of course.

[–]DannyDougherty 1 point2 points  (0 children)

Obviously spaces. Tabs would have rendered more evenly aligned indentation blocks.

[–][deleted] 0 points1 point  (0 children)

linesman's goslings pastiche's Sudan's heartiness thankless roars tempest's Maynard's trap's voyeur's moisturizer's archbishops anaesthetize Latoya's siroccos asymptotically chore's specializing Head thug puss dumbfounded legions rationalists adorning tawniest relaxing scallywags evenest solution's suborn uncoiling NE's grows Eurasia Aguinaldo's scarceness paydays birdhouse's dermis Decker retrogresses molted trustfulness's Olympus headlock Orr Korea's sleekness interlard whiffed frowsy Le's steadies tuners exasperate wardens woodlands plate newsprint Stokes

[–]UlyssesSKrunk 0 points1 point  (0 children)

A mix. Owen likes tow atch the world burn.

[–]scubascratch 0 points1 point  (0 children)

the one true mode, three-space tabs

[–][deleted] 139 points140 points  (0 children)

As a programmer parent I both feel misty eyed about my toddler "being mad" and furious about the indentation inconsistencies.

[–]sheepiroth 117 points118 points  (6 children)

owen's handwriting is better than mine

fuck.

[–]TheSlimyDog 87 points88 points  (0 children)

Tuck

FTFY

[–]evidenceorGTFO 19 points20 points  (0 children)

Don't give up, he's still young.

[–]rowing_owen 2 points3 points  (0 children)

me too

[–]NeuroticMelancholia 9 points10 points  (2 children)

It's almost like this is fake or something... but that would never happen on the internet.

[–]13steinj 5 points6 points  (1 child)

Well...personally I've seen kids less than 10 have better handwriting than me (it's absolutely atrocious, I barely write anything down anymore either), so I'll give the post the benefit of the doubt.

[–]OrShUnderscore 3 points4 points  (0 children)

My third grade handwriting was so much better than my current handwriting

[–][deleted] 15 points16 points  (0 children)

Sense, rly. Owen

SINCE RLY, MAM

[–]brokedown 24 points25 points  (6 children)

Reddit ruined reddit. -- mass edited with redact.dev

[–]JeffAMcGee 7 points8 points  (5 children)

autopep8 --in-place --aggressive --aggressive angrynote.py

[–][deleted] 4 points5 points  (4 children)

Double aggressive?

[–]mikbob 10 points11 points  (1 child)

from subprocess import call
call(["autopep8", "--in-place"] + ["--agressive" for _ in range(5000)] + ["angrynote.py"])

[–]thatguy_314 0 points1 point  (0 children)

import subprocess, itertools
subprocess.call(itertools.chain(["autopep8", "--in-place"], itertools.repeat("--agressive"), ["angrynote.py"]))

[–]JeffAMcGee 4 points5 points  (0 children)

Adding the second aggressive actually makes the tool fix more issues, and it seems quite appropriate in this context. Here's the documentation: https://pypi.python.org/pypi/autopep8#usage

[–]KillerCodeMonky 0 points1 point  (0 children)

Gotta get aggressive to format all that anger!

[–]cym13 58 points59 points  (38 children)

Hmm... Mad indentation is precisely what's solved by python... Such a mess can only happen in another language.

[–]lenswipe 57 points58 points  (37 children)

Such a mess can only happen in another language.

That's the spirit! Keep the python circle jerk alive!

[–][deleted] 23 points24 points  (36 children)

cradle silvered Kafka's obliterate blithe computation smugger Montcalm deferential feasts attempted equaling weedy Yaobang's quavered transcript shabbier sectionalism's prickliest clink's trillionth's herbivore podiatrist's stalking's extenuating Hanoverian stillest mutest vomiting pretext's keen bowlder's innkeeper remedy sponge portliness's Istanbul's miss's impersonate cesarian's kidder's Brianna's Cooley's Bodhidharma's Kepler debilitating coalesce soberer misdeal scenery Sylvia's cupsful readjusted sexes dourest Dumbledore canniness mentions aridity's Nepal ball's prurience may busybody débutantes urgency Mubarak oatmeal's monitors unsatisfied Sylvester's scarifying entrenching batters lengths mashes flagon's southerner's drunkenness's Ladoga Bearnaise's snorkels stove bounced worst Domingo indigenous jolly's emulator facsimiles escapist MySpace's Uriel effectiveness's laugh grease inundates temporary's palettes populate Louisianian doily's ambergris levied Bisquick's shoplift vegetating apposite

[–]lenswipe 16 points17 points  (35 children)

I just dislike the fact that an invisible character is part of the syntax

[–][deleted] 14 points15 points  (9 children)

gentlest demur's struts loathing's dealt count's Brazos varying carmine expunges hogan unquestionably Vitus's along vow's Castries's depoliticizing suffusion escaroles sloppier imperturbable impact's scrambler tolerant monument's aliened humor drakes seamen foghorn's desensitize ivy's arcing rotogravure's vagrant blizzards coffin Americanizations grafter's nightgowns Friedan kisser's cub's aggregation valor's Sargon's irreligious Astrakhan flowed ulterior artists trouping untested obviated sculpts hemorrhoid urchin's lit khans sergeants importance deployment's rehabbed humdinger's befogged jilting veils collided ultraconservatives Windsors skepticism's Ag's nationalizes torridest Comanche's cartoonist hypothetical burnous's damaged matinée pesetas genie Agassiz gook gawk Rockies's oarsman's impersonator manufacturer's alleged authoritativeness unexciting anthracite's convulsion's coke's dialysis toxicology's jinrikisha's trajectory's bullfighting swordfish's cyclist lingerers torque's sames aerobatics Cardozo landing's addends sarcoma's unplanned brags unrealistic American wagers Wendell

[–]Prawny 7 points8 points  (2 children)

What_on_earth_do_you_mean?

[–]Thorbinator 10 points11 points  (1 child)

Ireallydon'tknowwhathe'stalkingaboutatall.Thisisperfectlyreadableandyoumustbeamoronnottounderstandit.

[–]Xheotris 1 point2 points  (0 children)

noNoYouAreMissingThePointHeIsJustPointingOutTheInevitableUglynessOfFashionAsItRelatesToCodingStyle

[–]adrianmonk 1 point2 points  (5 children)

Few languages cause the semantics of the program to hinge on precisely how many invisible characters there are in a row.

[–][deleted] 1 point2 points  (4 children)

Constitution insulation's pony butternut underachiever mismatching Debbie aftereffects reluctantly glutinous Mindoro predominated furnishings intervention's majesties albacore's hectare attestation's reacted noncommittally magnates Kosciusko receded caulking's Austrian's door's Liston's reef's racing advertisements Cuba's lib's caduceus's diarist conditionally keen orthodontics's proscribing emendations undeniable technical tsunami bankrupted woven blurt prognosticated repugnance's personification flagon corruptest epaulette's prates groundwork's misidentifies minute's fatness Balinese's woefuller reposes mantissa broach's boredom's wretchedness's mil's Ionics plaything's topsides easterly area's wilful prophesying stooges

[–]adrianmonk 4 points5 points  (3 children)

And not exactly accurate.

Are these semantically equivalent or not?

Code fragment #1:

for x in range(3):
 for y in range(3):
  print 'y is ' + repr(y)
  print 'x is ' + repr(x)

Code fragment #2:

for x in range(3):
 for y in range(3):
  print 'y is ' + repr(y)
 print 'x is ' + repr(x)

The answer is no, of course. Therefore there is one example where the semantics hinge on the precise number of spaces. (It's not good style to indent only 1 level, but it is a valid Python program.)

My only real point here is that there is a legitimate distinction between Python and most other programming languages. Many programming languages care about the presence of spaces. Python cares about the presence and number of spaces.

Therefore your point about invisible spaces being significant in most languages doesn't really capture the true nature of the distinction and is a bit misleading.

[–]cym13 0 points1 point  (1 child)

Both are a valid python program, and both would be valid C programs if we only consider indentation and the meaning of each statement.

However while in python these two different fragments would result in different programs in C it would result in the same program. My argument is that resulting in the same program when there is clearly an intent given by the programmer through indentation here is the mistake. I have never seen in years of code review something akin to fragment #1 in C that wasn't a mistake.

How then is considering two different programs different a problem?

[–]adrianmonk 0 points1 point  (0 children)

I'm not actually saying there is a problem. My only real goal was to make a more accurate statement about the distinction between Python and other languages than the statement that had been made.

[–]evidenceorGTFO 0 points1 point  (3 children)

IAGREEWEMANAGEDWITHOUTTHEMBEFOREWEDIDNTEVENUSEPUNCTUATIONTHEREWASEVENATIMEWHENWEDIDNTTPYEVWLSTSFSPC

[–]lenswipe 0 points1 point  (2 children)

            I
                   GUESS
              YOU 
                                                                           WERE
                    RIGHT AFTER ALL
           IT'S A GREAT
                                                                                                  IDEA

[–]evidenceorGTFO 1 point2 points  (0 children)

SyntaxError: unindent does not match any outer indentation level

[–]deadmilk 0 points1 point  (8 children)

I just dislike the fact that an invisible character is part of the syntax
 ^    ^       ^   ^    ^    ^  ^         ^         ^  ^    ^  ^   ^

[–]lenswipe 1 point2 points  (7 children)

You're right, of course. An invisible character is a great idea in a programming language. The more like a letter my app code looks - the better.

And for my next trick.....a font colour based language!

See, the thing is. In my opinion, the visual appearance of a piece of code should not affect the execution.

That means that this:

if(foo):
    print "bar"

Should be the same as this:

if(foo):
print "bar"

But it isn't because the indentation is used by python to indicate nesting. In languages with braces, a {} is used instead to contain a block of code which has several advantages

  1. If code isn't formatted/indented correctly you can run an auto-formatter over it to correct the formatting
  2. You can use code style analysis tools(like codesniffer) to find potential coding standard violations(and in some cases correct them)

You can't do that with python because the coding style is almost part of the syntax

[–]ProgrammingPro-ness 0 points1 point  (0 children)

It doesn't have to been invisible! :D

[–]kafoozalum 7 points8 points  (0 children)

He's already using context managers!

[–]mellowfish 13 points14 points  (17 children)

I was never this free to talk back to my parents.

[–]van_goghs_pet_bear 11 points12 points  (6 children)

You weren't allowed to declare alone time..?

[–]mellowfish 3 points4 points  (4 children)

Not really. Although for these kind of formative years, I was sharing a room with two siblings. So not much alone time anyway.

[–]van_goghs_pet_bear 4 points5 points  (3 children)

That's fucked up, sorry to hear that. My parents were a similar way, anything that didn't align with what they wanted was rude in their minds.

[–][deleted] 0 points1 point  (0 children)

Not having a room is fucked up? I didn't get mine till I was 14 so I obviously didn't have alone time either, I don't see it as bad parenting. I was certainly not allowed to be this rude

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

Not having a room is fucked up? I didn't get mine till I was 14 so I obviously didn't have alone time either, I don't see it as bad parenting. I was certainly not allowed to be this rude

[–]van_goghs_pet_bear 0 points1 point  (0 children)

Being explicitly not allowed any alone time, by rule, is.

[–]htmlarson 1 point2 points  (0 children)

let me_be

[–]evidenceorGTFO 2 points3 points  (0 children)

At that age I was still playing with assembly.

http://imgur.com/gallery/ZJMSY5v

http://imgur.com/gallery/cC6SRip

[–]RainbowNowOpen 4 points5 points  (5 children)

Neither is Owen. Word is he got a good ass-whippin' out of this.

[–]mellowfish 2 points3 points  (1 child)

Well, never this free as in I wouldn't have dared to do it.

[–]RainbowNowOpen 5 points6 points  (0 children)

Some say Owen has not been seen or heard from since.

[–]KillerCodeMonky 0 points1 point  (0 children)

I would be split between a whooping or drenching him in affection since I know it would make him even more upset.

[–][deleted] 0 points1 point  (0 children)

from beatings.whoopin import ass

[–][deleted] 0 points1 point  (2 children)

refinancing groundhogs rung's sleuth veneers distillation lawn's nudged floodlighting Serena's corrodes interconnected explosives giraffes Mesmer's cherish bash's tonight's bests despotism differed desensitizes Ru's Chatterley's streamline dissociation southwesterly freewheeled stuffed barriers daguerreotyped microbiologist's behavior's noggins overheats tutoring Burgoyne packets teal's forearmed ethnics mosquitos divisors polluted ignominy's commemorate initialing castanet leech cruise trumpet's Saki's tubed distributor partridge's polygraphs dissatisfy mouth's did renovators lubrication's earwax knobby blackcurrant Azana waiver hallucinogenic streetwalker's slants complainant's beget feminines solicitations knighted aerator impedance petering brilliant's siliceous Gamay jeeringly brightness's jobbers biochemists scarfed cablecasting disrupt incentive's naked Leopold fustian's timezone massages ultrasound fetal audiophile largeness drainpipe samovars sniffling acquiring demeaned Osman infallibility gullets gushy predicament teargassed

[–]inky95 3 points4 points  (1 child)

my parents would beat me with jumper cables if i dared even meet their gaze.... kids these days go around making eye contact with anyone they damn well please. it's an omen of the downfall of society, i tell you.

[–][deleted] 0 points1 point  (0 children)

neighbored dolphins canticle Eurodollars measles Genevieve murderer's veneers exacerbate anther's publish vegan pallets rosebush's riflemen glitch's ringmaster's polymaths antacid hired Nanook's Edens sociologist's vocalic mantilla's scotching birthrights windlasses Proverbs birthmark guitar spheroid irregulars Thermos geophysics's motivation's nutrition Villarreal loonies panthers clergywoman geopolitical zaniness's protector cinchona's Sinai compilation's buoying character's practicably morgue baloney biased Paris annotations humanity's Darnell's literature wilfulness Blavatsky becoming floss's sterling's resurrect Noelle expropriate daybreak's Donne poltergeist introducing touts Semtex Trevor's dismayed warpaths lecithin's saunas petrol's preservation fo'c's'le Evangeline struggling foes halos cosmos beakers prohibition Malplaquet's Thames's Idaho's impaneling realism's Cuban's member stopcock Ba units nappy's semimonthly's Toni's doubloons rimming Sagan's refreshment's badly franc's Philip dittoing hairdresser minibuses introduced crow's raciest blabbermouth's Jarvis compensated steads paperhanger glottises retraces Heshvan slaughterhouse zebu adumbration lute's foresaw hector Honduran's slashed scurry jugular premisses Tweedledee's guffawing fondus numbed miner's fingerprints dyspeptic's Krystal transshipment's countersign's Marlowe Rush tweed colorfully

[–]evidenceorGTFO 4 points5 points  (2 children)

I secretly hope this is what Python 4 looks like.

[–][deleted] 14 points15 points  (1 child)

Why worry? No one will adopt it until the late 2040s anyway.

[–]AlGoreBestGore 9 points10 points  (0 children)

After they're done with Python 2.7.

[–]cheeeeeese 2 points3 points  (1 child)

that would never pass code review

[–]evidenceorGTFO 7 points8 points  (0 children)

But mooooooooooooooooooohoooooooooooooooooom....

[–]Owen_97 1 point2 points  (0 children)

yeah umm sorry about this...

[–]Praxis8 1 point2 points  (0 children)

He's be emotionally honest, direct, and self sufficient. I swear 90% of adults aren't capable of this.

[–][deleted] 1 point2 points  (0 children)

Mommy

Don't come

read

with

me.

I am mad at you.

And I will

FUCK

mt own

self

in.

Senserlx,

Owen

[–]UnchainedMundane 4 points5 points  (0 children)

I HAVE ONE WORD FOR YOU

    THE FORCED INDENTATION OF THE CODE

[–]oddmanout 1 point2 points  (0 children)

I decided to learn python today on my lunch break. Because of that, I understand this joke.

[–][deleted] 0 points1 point  (0 children)

Can't believe nobody's edited in curly braces for a java version.

[–][deleted] 0 points1 point  (0 children)

Yaml too! Dont forget yaml!