[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

PEP 8

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

Is PEP 8 pretty much methodological autism? How important is it really?
>>
>>60955327
>tfw used to using the following function naming convention: thisIsAFunction()
>but PIP 8 autism enforcer on my IDE highlights it as an error

Should I change my function title naming just to satisfy Pip 8?
>>
>>60956034
Yes you should.
Naming convention and code guidelines can vary between project.
I suggest you to be not fanatic to any of them and be fluid on your work.
>>
>>60956034
You can disable the warnings on PyCharm, but camel case in python looks pretty reatarded.
>>
>>60956064
This. It's pretty evident what you should be using if you're working with standard library functions.

My biggest annoyance with PEP-8 is actually the 80 character line limit. I know the philosophy is to write short lines and it's fine in most cases but it can all go out the window when using and/or logic or using list comprehensions, force you to obscure the names of your variables or break an expression over two lines.
>>
>>60956034
Yes, using snake case is an actual standard among a huge part of python devs, not just pep8.
Wrappers around C/C++ libraries are usually exempt as those use their language's equivalent (like opencv)
>>
>>60955327

PEP 8 is a good base, but you need to apply common sense. If you are in deep indentation either split into functions if possible, or just go over the limit.
>>
>>60955327
>>60956139
>Thinking about code formatting in 2017
Just get YAPF or some similar tool and you won't have to think about where to put newlines ever again.
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.