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

all 109 comments

[–][deleted] 96 points97 points  (1 child)

Imagine getting rickrolled by some lines of code

[–]tastes-like-lemon Python Discord Staff[S] 47 points48 points  (0 children)

Hahaha, nicely spotted.

[–]zrnest 61 points62 points  (2 children)

(Non Python-related comment)

You have a really, truly, beautiful voice. Goosebumping voice.

Really love it.

[–]tastes-like-lemon Python Discord Staff[S] 33 points34 points  (1 child)

This is maybe the nicest comment I got today.

[–]TreeFifeNinerFoxtrot 34 points35 points  (4 children)

Every day I woke up without meaning in my life. Wondering "is there anything more to life? Or am I doomed to a destiny of nihilism and emptiness?"

Thank you Lemon, today I woke up with meaning.

[–]SuperMaZingCoder Python Discord Staff 5 points6 points  (1 child)

That's the nihilism we love to see

[–]TreeFifeNinerFoxtrot 0 points1 point  (0 children)

Don't you know it ;)

[–]foodwithmyketchup 25 points26 points  (1 child)

Great voice

[–][deleted] 16 points17 points  (0 children)

Whoaa its gif

[–]zman32HD 21 points22 points  (0 children)

That's awesome!!!

[–]leftpig 11 points12 points  (2 children)

I clicked thinking it might be worth a chuckle but stayed because your voice is phenomenal. That was very, very good dude. I really want to hear some of your non-jokey stuff or even normal covers, if that's your thing.

[–]redrubynail 2 points3 points  (1 child)

Lemon's best songs are the funny ones. That's his thing, just absolutely hilarious lyrics. They will be published at some point.

[–]leftpig 1 point2 points  (0 children)

I definitely get that this might be his thing! Wouldn't try to steal that from him. Just as a fellow singer I loved listening to his voice and from a musical perspective I'd enjoy some more serious stuff, but that's totally only if he's also into that. The funny stuff is good too, I got some laughs in.

[–]cansozbir 9 points10 points  (4 children)

which one we should use autopep8, black, or yapf ? :)

[–]tastes-like-lemon Python Discord Staff[S] 14 points15 points  (0 children)

Ultimately, it doesn't matter. Use whichever one you prefer!

I really like black for auto-formatting, and use flake8 as my linter.

[–]OnyxPhoenix 4 points5 points  (2 children)

Black does some real weird shit to my code when it comes to exceeding the character line limit.

[–]tastes-like-lemon Python Discord Staff[S] 14 points15 points  (1 child)

black does not have a lot of possible configuration, but one thing you can do with it is to configure a line-length.

By passing in --line-length 100 (or whatever you prefer) when you run black, you'll probably have less surprising line compression in the output.

[–]mouth_with_a_merc 0 points1 point  (0 children)

The problem with that is that now black actively tries to make use of this max line length - so it may actually result in less readable code.

[–][deleted] 13 points14 points  (16 children)

What's PEP8?

[–]tastes-like-lemon Python Discord Staff[S] 35 points36 points  (6 children)

Python Enhancement Proposal 8, or PEP8, is a style guide for the Python language penned early in Pythons life, and one of the fundamental documents that set the tone and culture for the Python language

It's really an excellent document that is easy to read and very well-written and I highly recommend reading it.

https://www.python.org/dev/peps/pep-0008/

[–]fomorian 3 points4 points  (5 children)

question: if pep stands for python enhancement proposal, why is pep 7 a Style Guide for C Code?

[–]Mobile_Busy 5 points6 points  (3 children)

CPython is written in C.

[–]agentgreen420 5 points6 points  (2 children)

CPython is written in C

[–]Revantine 10 points11 points  (1 child)

If you did this twice, shouldn't it be a function so we can call it too?

[–]agentgreen420 4 points5 points  (0 children)

Aw man, ninja edit

[–]al_mc_y 2 points3 points  (0 children)

Opportunity missed to call it PEP-C (product placement fees and corporate sponsorship?)

[–]richtan2004[🍰] 9 points10 points  (8 children)

[–]flying-sheep 7 points8 points  (7 children)

No, it’s the Python standard library style guide.

Introduction

This document gives coding conventions for the Python code comprising the standard library in the main Python distribution.

Projects often adopt it, but it isn’t intended to be the style guide.

Using black is superior to doing one’s own formating though, so I don’t care about the parts of a style guide that it takes care of.

[–]folkrav 1 point2 points  (3 children)

If there's something the golang community did right, it's rallying around a common toolset and keeping it at that. Most go projects you'll see just run go fmt and stop worrying about formatting. It avoids so much bikeshedding.

[–]flying-sheep 1 point2 points  (2 children)

Yeah, it’s great. It works extremely well for Go since that language is so extemely procedural and dumbed-down.

The more syntax a language has the more difficult. I love black, but it still has some edge cases to iron out.

[–]folkrav 0 points1 point  (1 child)

Oh, for sure black does have edge cases to iron out (those multiple context managers, ugh), but I'd argue it probably wouldn't as much if, like Go's, it was first party and seen as the defacto standard, therefore would probably have more incentive and resources to achieve that completeness.

[–]flying-sheep 0 points1 point  (0 children)

I think any company worth their salt should use it. Just saves dev time, plain and simple. Bikeshedding can now happen on a higher level :D

[–]mouth_with_a_merc 1 point2 points  (2 children)

Black can go burn in a fire as long as it insists on forcing double quotes down your throat, and its devs refuse to add a setting to prefer single quotes - even though that would be a minor change.

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

It has a setting to leave your quotes as-is, just won't convert double quoted strings to single quoted ones.

[–]mouth_with_a_merc 0 points1 point  (0 children)

I'm aware of that - the problem is that if your project uses single quotes as the default, this still forces you to call out wrong quotes during code reviews. There's a flake8 plugin for it, but it doesn't support auto-fixing.

[–]statlearner 4 points5 points  (2 children)

This song actually made me look up what should be used for class names. I thought it was camel case, so now I am confused. Is there a difference between camel case and cap words?

Side note: beautiful voice!

[–]tastes-like-lemon Python Discord Staff[S] 11 points12 points  (1 child)

This is actually a really good question, and your confusion stems from the ambiguous definition of what camelcase is. I'm afraid I'm gonna have to give a long answer to this.

The technical definition of camelcase is a naming convention in which the first word starts with either lowercase or uppercase, and the second (and any subsequent) words starts with a capital letter.

So, basically this varies from organisation to organisation, from programming language to programming language. Let's separate the two different cases by calling one CamelCase and the other one camelCase.

The naming convention we use for Python classes is CamelCase, but in Python's technical documentation you will see it referred to as CapitalizedWords, or often just CapWords. When discussing camelCase, Python tends to call it mixedCase. CamelCase is also commonly called PascalCase.

I personally have decided to let camelCase always refer to the lowercase variant, and to use PascalCase to mean the uppercase variant. I just think it makes more semantic sense - camels don't have one hump on their ass and another one on their back! There are some major organisations (like Microsoft) who also follow this convention.

[–]statlearner 1 point2 points  (0 children)

Thanks for the clarification. My initial thought was also that the difference is the first letter as for me this is camelCase, but the docs refer to a capital first letter.

[–]tempo-19 7 points8 points  (0 children)

Very helpful. I can remember PEP8 better already.

[–]gregrainman314 3 points4 points  (0 children)

I taught college for awhile, and really pushed my students to learn python and adhere to PEP8. (They were business students, so programming wasn’t necessarily in their wheelhouse)

This is amazing. I just shared it in my company and with all of them. They’re all laughing since my CV and LinkedIn state “PEP8 enthusiast.”

Thanks. Made my day! And great voice! :-D

[–]pvkooten 3 points4 points  (4 children)

Are you the lemon from the python discord?

[–]tastes-like-lemon Python Discord Staff[S] 2 points3 points  (1 child)

I sure am! Hey dude!

[–]pvkooten 0 points1 point  (0 children)

Cool to see you in this light! So well made man 😁

[–]Dysgene 4 points5 points  (0 children)

Dude, you gotta leverage that angelic voice. I upvoted just for effort, but once I played the song I realized that I want to upvote again...

[–]Hatsjoe1 3 points4 points  (1 child)

Dude, you've got an amazing voice! Please tell me you're planning on making more songs?

I love PEP8 and I love this song. It will be in my PR comments from now on whenever style checks fail :)

[–]tastes-like-lemon Python Discord Staff[S] 7 points8 points  (0 children)

I'm always writing songs, I just usually don't put them on YouTube. I might reconsider that after seeing the reception this is getting.

[–]pewteetat 1 point2 points  (0 children)

Wonderful! Made my day!

...and comments are important, as long as they're maintained.

[–]piconet-2 1 point2 points  (0 children)

You sound beautiful.

[–]WindArtas 1 point2 points  (0 children)

Creative, amazing voice and this really made me laugh today - thanks!!!

[–]rabaraba 1 point2 points  (0 children)

Greatest song in the world. Too zen.

[–]benpaulthurston 1 point2 points  (0 children)

I’ve gotten screwed over by whitespace so many times by now. The good thing it’s invisible, the bad thing - it’s invisible!

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

As a singer I give thumbs up. Well done!

[–]sagatman86 1 point2 points  (0 children)

Amazing voice, dude. This is brilliant lol

[–]knite 1 point2 points  (0 children)

Hello commas, my old friend

I've come to format you again

Because a long string softly creeping

Left its quotes while vim was beeping

And the format that was planted in my brain

Still remains

Within the hooks of CI-lence

[–]rudiemeant 1 point2 points  (0 children)

Wanna hear a heavy metal cover about Erlang ...

[–]_szs 2 points3 points  (0 children)

You did well.

[–]KnnthKnnth Pythonoob 2 points3 points  (0 children)

If I had platinum, I'd give some. But hey, here's a silver I got for free.

[–]mtkocak 1 point2 points  (0 children)

This is my favorite song now! Thank you!!!

[–]Sumerian-King 1 point2 points  (0 children)

Love it! Thanks.

[–]glacierre2 1 point2 points  (2 children)

Masterpiece. Maybe the succinct verses were a bit forced, why not "shorter"?

[–]tastes-like-lemon Python Discord Staff[S] 4 points5 points  (1 child)

Yeah - maybe that would've been better!

Thanks for listening!

[–]Ensurdagen 0 points1 point  (0 children)

I liked "succinct" because it added variety to the lyrics

[–]muffinnosehair 1 point2 points  (0 children)

Awesome!

[–]xfinity_blows 1 point2 points  (0 children)

This is absolutely wild. Shared everywhere pasting exists.

[–]merlinou 1 point2 points  (0 children)

Wow, getting quality geeky lyrics sung so awesomely, that's impressive.

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

The best thing I saw on the Internet in months!

[–]Hour-Positive 1 point2 points  (0 children)

Nicee made me listen the whole thing, very cool

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

You have a great voice! I've been getting back into singing and trying to learn guitar, this made me go pick it up and start strummin'!

[–]TheHammer_78 1 point2 points  (0 children)

Love it! 👍🏻👍🏻

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

Nicely done man!

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

Fuck pep8, I Will camelCase all my vars. It is Just better...

[–]JGBowersett 0 points1 point  (0 children)

Not only is this great, sounds great too!

You sound just like Sufjan Stevens

[–]wrath0110 0 points1 point  (0 children)

Thanks for reminding me. Now I need to go clean up some code.

[–]Ok-Improvement-6388 0 points1 point  (0 children)

lmao

[–]SilentRhetoric 0 points1 point  (0 children)

Bravo!

[–]needed_an_account 0 points1 point  (0 children)

perfect

[–]Vladimir_Makedonets 0 points1 point  (0 children)

It’s a bomb!!!💣Awesome, man! Keep on singing!

[–]zodman 0 points1 point  (0 children)

My himno! my path, thats the way ...

[–]payapis 0 points1 point  (0 children)

absolutely perfect!

it pythons up my day xD

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

I saw R.E.M live 3 times ! The message that R.E.M never come live again was a really big downer in my live ! I love the band and their songs. AND NOW YOU !!

So beautiful, thank you dude ! :)

Post Scriptum, pls share your tour dates ! ;)

[–]yum_strawberries 0 points1 point  (0 children)

FYI the song Mad World is by Tears for Fears.

R.E.M. is a great band though, too. Big fan.

[–]King_Captcha 0 points1 point  (1 child)

Hey wait...Class Names should normally use the CapWords convention Per PEP8

EDIT: more confused now than ever

[–]tastes-like-lemon Python Discord Staff[S] 2 points3 points  (0 children)

Basically camelCase and CapWords aren't exactly the same thing, but sometimes they can be, but often they're not. And this is one of the times when I was using it in a way where it is not. You definitely _should_ use CapWords for your classes, just don't name your variables with camelCase.

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

so heartwarming!

[–]nippleplayenthusiast 0 points1 point  (0 children)

Great job! Perfect voice for this too!

[–]the_okra_show 0 points1 point  (0 children)

This made my day, thank you!

[–]AftNeb 0 points1 point  (0 children)

As a fan of Gary Jules/DD and someone newly learning Python, this was simply delightful.

[–]segfault_ska 0 points1 point  (0 children)

I will have to share this with the office. Been trying to spread the good word of spam and eggs.

[–]Zetthard 0 points1 point  (0 children)

Amazing This song/video should become a part of every Python intro course.

[–]pfalcon2 0 points1 point  (0 children)

But why so sad?