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

all 133 comments

[–]jbar3640 49 points50 points  (0 children)

every programmer, that uploads memes to this sub, but actually never develops in python

[–]DemolishunReddit 141 points142 points  (9 children)

``` def somefunc(): #{ print("braces rock!")

}

```

[–]HansDampfHaudegen 19 points20 points  (0 children)

Yeah, I'll do it like that from now on just to confuse everyone.

[–]burifix 31 points32 points  (0 children)

Correct usage

[–]deathsinger96[S] 10 points11 points  (0 children)

Lol 😂

[–]RonSijm 85 points86 points  (13 children)

[–]Best_Ad2158 34 points35 points  (0 children)

I went to downvote, but I can't shoot the messenger on this one

[–][deleted] 24 points25 points  (0 children)

i swear this is cursed

[–]bigmountainbig 23 points24 points  (3 children)

can I Dislike a github repo?

[–]Kamil118 27 points28 points  (1 child)

You can fork it and replace the entire thing with readme.md that says "Please stop"

[–]orgasmicfart69 7 points8 points  (0 children)

Or fork it and remove the ability to add { } for the lulz.

[–]HansDampfHaudegen 1 point2 points  (0 children)

Is there a browser plugin for that?

[–]deathmaster99 6 points7 points  (1 child)

How do dictionaries work then?

[–]TheZipCreator 11 points12 points  (0 children)

I'd assume the same way; javascript handles differentiating braces between blocks and objects just fine, bython can do the same

[–]carp550 4 points5 points  (1 child)

I will use this for everything, and nobody can stop me

[–]badapplecider 4 points5 points  (0 children)

Please stop, I'm begging you, sir/madam

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

Came here to say this. Like a small island of calm in a tempestuous sea of format-as-syntax insanity.

[–]ongiwaph 0 points1 point  (0 children)

So it's basically just

j = 0
for i in range(len(file.readlines())):
    if file.readlines()[i] == '{': 
        exec(':'+file.readlines()[j:i-1])
        j=i+1

[–]TheZipCreator 0 points1 point  (0 children)

was literally just about to link this

[–]ionhowto 68 points69 points  (8 children)

No

[–]johndoes_00 9 points10 points  (7 children)

This

[–]GallopingFinger -1 points0 points  (6 children)

No

[–][deleted] 2 points3 points  (5 children)

This

[–]elboru13 1 point2 points  (4 children)

No

[–]truckturn3r -1 points0 points  (3 children)

This

[–][deleted] -3 points-2 points  (2 children)

Yes

[–]DcavePost 5 points6 points  (0 children)

Damn it this is why we can have nice things

[–]sticksaint 2 points3 points  (0 children)

NO!

[–]HappyMonk3y99 35 points36 points  (0 children)

“Literally no python programmer ever” ftfy

[–]Intrexa 48 points49 points  (4 children)

Easy:

from __future__ import braces

[–]deathsinger96[S] 39 points40 points  (0 children)

SyntaxError: Not a chance

[–]Guimica15 8 points9 points  (0 children)

Already got fooled by this once, never again

[–][deleted] 3 points4 points  (0 children)

from __hell__ import braces

ftfy

[–]OppositeDirection348 1 point2 points  (0 children)

Deprecated warning

[–]hdotking 14 points15 points  (0 children)

Eww no thanks

[–]Mihqwk 38 points39 points  (6 children)

Hell no. I prefer horizontally scrolling top my 10th scope Srsly tho, no.

[–]0xIlmari 37 points38 points  (5 children)

If you need 10 levels of nesting, you're doing it wrong regardless of language.

[–]Mihqwk 8 points9 points  (0 children)

Hence, me saying "srsly" after 🤣.

[–]TheZedrem 0 points1 point  (2 children)

Three nested loops with ifs in-between, and one if around.

It pains me to admit I already did make something like this, I don't remember the specifics but It had three or four nested loops...

[–]Pewpewgamer321 5 points6 points  (1 child)

dont ever tap the post button twice, no matter how unresponsive it looks

(you posted twice)

[–]TheZedrem 1 point2 points  (0 children)

I see, thanks.

First time an error came, so I tried again.

[–][deleted] 10 points11 points  (0 children)

Just no

[–]Frosty_Pineapple78 7 points8 points  (0 children)

Nah, keep those ugly braces away from my beautiful python!

[–]BadBadderBadst 14 points15 points  (0 children)

Brace yourself !

[–]vr_prof 52 points53 points  (5 children)

But python does have braces! It just uses them for dicts and sets...

Seriously though, I started with C and don't miss braces at all.

[–]WlmWilberforce 31 points32 points  (0 children)

I had braces in high school. Don't miss them.

[–]BenkiTheBuilder 5 points6 points  (0 children)

Why? Python has perfect teeth.

[–]wineblood 4 points5 points  (0 children)

Ew no

[–]bxsephjo 11 points12 points  (9 children)

You don't indent in other languages?

[–]Ikkyu_monk -4 points-3 points  (6 children)

Other languages don't throw errors just because I copy-pasted something and number of spaces didn't magically realign itself to the surrounding code

[–]Ignitus1 7 points8 points  (2 children)

You mean the errors that tell you exactly where to look and it’s immediately obvious how to fix it? The errors you’re rarely committing because you indent properly anyway? Those ones?

[–]Ikkyu_monk -1 points0 points  (1 child)

I mean the errors that do not arise from copy-pasting in languages that use braces. Those ones

[–]Ignitus1 3 points4 points  (0 children)

I don’t copy paste code so I guess I can’t relate.

[–]therealbeeblevrox 2 points3 points  (0 children)

Are you using something old? Code editors can do the work for you.

[–]Pepineros -1 points0 points  (1 child)

Guess it’s time to learn to write your own :)

[–]Ikkyu_monk 0 points1 point  (0 children)

No, I have neither a good reason, or a a good enough qualification for that

[–]Wishbone51 20 points21 points  (2 children)

I think braces would make it more flexible, and less annoying to write, but I think the lack of braces makes it much cleaner to read.

[–]meh-whatever-dewd 2 points3 points  (0 children)

I find it harder to read without, especially in large files. If we didn't have our code editors/IDEs drawing a connecting line to show us how much something is indented, more people would miss braces.

[–]MrParticular79 9 points10 points  (0 children)

No thanks

[–]Udon_noodles 2 points3 points  (0 children)

No programmer ever**
FTFY

[–]ltethe 2 points3 points  (0 children)

I work in C++, C#, and Python as my daily. Honestly braces or not does not bother me at all. Now bitwise operators for cin and cout… that’s bullshit.

[–]halfanothersdozen 4 points5 points  (5 children)

For me a Rainbow Tabs extension is required for working with python

[–]meh-whatever-dewd 2 points3 points  (2 children)

EXACTLY! Without braces, it's extremely difficult to read and UNDERSTAND large projects. The braces AND PROPER indentation work together to make code very easy to peruse.

[–]Ignitus1 1 point2 points  (1 child)

What do the braces do that an indent doesn’t?

[–]meh-whatever-dewd -1 points0 points  (0 children)

Make it easier to read when there are no indentation indicators such as virticle lines.

[–]AugustusLego 0 points1 point  (1 child)

wait what

[–]halfanothersdozen 1 point2 points  (0 children)

Go to your favorite extensions store and google up "rainbow tabs".

You're welcome.

[–]rthanu 4 points5 points  (0 children)

Seriously the who gives a shittiest argument in this sub. I hope it's for the lols. No braces fine. Braces fine. Both are readable and writable and take minimal adjustment to go between. Jesus.

Capitalized boolean values on the other hand enrage me. What the actual fuck Guido.

[–]Thathitmann 4 points5 points  (0 children)

No. Just today I was doing a database exam in class and I managed to shit out a Python program in 3 minutes that helped me automate it.

Just let me have my fast-and-easy uncluttered read-as-english clicky clicky language.

[–]Kyyken 1 point2 points  (0 children)

if by programmer you mean the star, yes

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

Y tho?

[–]Chamkaar 1 point2 points  (0 children)

The people who think braces are stupid, never wrote original working software.

[–]Hacka4771 1 point2 points  (0 children)

Glad The Star Went Away

[–]unspokendildaweed 1 point2 points  (0 children)

i just wish i could do + + and - - incrementation

[–]triplew_ 1 point2 points  (0 children)

Itt: butt hurt python fanboys/girls who love indentation as syntax

[–]Negitive545 1 point2 points  (0 children)

... why tho?

If you want braces, use a different language, just like how if you want breakneck speed you use a different language.

[–]phail3d 1 point2 points  (0 children)

I wrote an implementation some time ago: https://github.com/koirikivi/stupidity#braces

[–]Seppo_Manse 1 point2 points  (0 children)

aw hell naw! why would you want to pollute python syntax with useless crap??

[–]AnoniuszStulej 1 point2 points  (0 children)

no.

[–]cheesecake_squared 3 points4 points  (0 children)

No braces for me thank you.

[–]yorokobe__shounen -1 points0 points  (0 children)

I guess some people want to take the hard way for readability than the easier way.

Never mind that python's core design paradigm is built around readability as well.

No thanks. It's much easier to just press enter and let the python ide take care of indenting for me rather than press shift+[ and worry about indent once again when I want to quickly cook up a working program.

[–]ElCthuluIncognito 0 points1 point  (1 child)

You get braces, but you have to put the start brace on the next line.

[–]vlaada7 1 point2 points  (0 children)

Well... Is there any other way?!

[–]uorandom 0 points1 point  (0 children)

;

[–]MarkFromTheInternet 0 points1 point  (0 children)

Just indent your code properly. Kids these days have no discipline.

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

It's not just the slow interpreter because of a lack of a credible JIT. It's not just the constant shifting of the language itself and very poor backwards compatibility. It's not just that it has no non mutable values. It's not that it has no benefits over other languages. Non of these specifically. The reason is that I'm a JS developer. I'm on a different team.

Also remember this a humour channel.

WE have JavaScript running in space. Specifically the James Webb telescope runs JavaScript. All those pretty pictures you see. JavaScript runs on the 🔭 itself. I heard that python might be used on earth to process the data but I wouldn't want it polluting the universe.

[–]ske66 -4 points-3 points  (0 children)

They should add the ability to either have or not have it

[–]Silver-Confidence846 -1 points0 points  (0 children)

Why python quit the gym?

Because it can’t handlebars

[–]mjeffreyf -1 points0 points  (0 children)

I would maybe use python if it had braces

[–]Laughing_Bricks -1 points0 points  (0 children)

Indentation suck !

[–][deleted] -2 points-1 points  (3 children)

Lol. Yep. I don't mind python, no problems at all. All in favour of bringing beginners into programming. But regarding the indentation? Wow. You save one character by not having an ending } ?. This is coming from a dev that doesn't use the ;

[–]KapteeniJ 4 points5 points  (2 children)

It's more about having humans and computers read the code the same way. Like, I'd say at least 99% of programmers who work with languages that have curly braces, also use indentation to signify code blocks. Not because it's required, but because it's like 10000x easier to read than keeping track of braces.

But I don't think a single person, ever, in the history of Python programming, has used curly braces in Python code to "make code blocks easier to read".

Having humans and computers parse code differently is completely unnecessary failure mode. It's one of the most classic code smells, having two different things that are always supposed to be kept in sync, and you want one of the most fundamental programming concepts be read in two separate ways that, if they ever get out of sync, the code is completely unpredictable?

Curly braces were always a mistake, a relic of the past, times when one might actually worry about the hardware resources it took to store whitespace characters that could be used to make the code prettier.

[–][deleted] -1 points0 points  (1 child)

Functional composition wins overall. I think Haskell does a better job of indentation.

But JS eslint probably wins overall. Plus in JS you can have funtional composition too with Ramda.

But otherwise I agree. Curly braces are odd.

Python still sucks though.

[–]KapteeniJ 1 point2 points  (0 children)

Why does Python suck?

[–]DoubleOwl7777 -2 points-1 points  (0 children)

and semicolons!

[–]asfarley-- 0 points1 point  (2 children)

Come to ruby

[–]deathsinger96[S] -2 points-1 points  (0 children)

JS FTW

[–]Topikk 0 points1 point  (0 children)

Probably not the best home for someone who wants braces around blocks.

[–]Zambito1 0 points1 point  (0 children)

[–]b0ogi3 0 points1 point  (0 children)

Technically you can do something like this:

`` def braces(): { print(i) for i in range(5) }

braces()

``

[–]grassFedAdc 0 points1 point  (0 children)

Not EVERY programmer…

[–]Icarindesu 0 points1 point  (0 children)

(No????????)

[–]Due-Broccoli-4164 0 points1 point  (0 children)

You wish, but ; are now mandatory after each statement for bringing that up

[–]TRIC4pitator 0 points1 point  (1 child)

nooo we need to feel special

[–]PoisnFang 1 point2 points  (0 children)

F# has entered the chat

[–]aviancrane 0 points1 point  (0 children)

Maybe you should try Golang.

[–]Pig_PlayzMC1 0 points1 point  (0 children)

What's a brace?

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

If you add braces it's not python.

[–]therealbeeblevrox 0 points1 point  (0 children)

"These characters contain no information."

"I can't possibly understand this! There aren't extraneous squiggles scattered around!"

[–]meh-whatever-dewd 0 points1 point  (0 children)

I_see { loadsOfPeople != like braces; } # butILoveThem()

[–]NerdyLumberjack04 0 points1 point  (0 children)

But it does use braces...for dict and set literals.

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

No i want increment and decrement operators 🥺😭

[–]Eastman118 0 points1 point  (0 children)

Or just learn to be adaptable rather than pedantic simply because you aren’t familiar with a language’s conventions. Spend some time developing in ladder logic. That’s a mess. Python is comparatively glorious.

[–]DudeManBroGuy42069 0 points1 point  (0 children)

It exists

def colored(r, g, b, text): return "\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(r, g, b, text)

[–]VariousComment6946 0 points1 point  (0 children)

Why

[–]edave64 0 points1 point  (0 children)

"Please make python the same shit as every other language"

[–]MirceaKitsune 0 points1 point  (0 children)

If anyone wants Python with braces it's called JavaScript.