pep8.org - The Prettiest Way to View the PEP 8 Python Style Guide

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ค. 2017
  • Improve your Python skills, one bite at a time: dbader.org/python-tricks
    PEP 8 is the most popular code style guide for Python. It's widely known and used by the Python community. If you're looking for formatting advice on your Python code, look no further. It's a good time investment to spend a few hours reading through PEP 8 and learning how to apply its recommendation to your own projects.
    A common challenge with applying PEP 8 is that the original web page on python.org for it is kind of difficult to read-for example there's no code highlighting or a persistent table of contents you can use to navigate around.
    pep8.org is a project that aims to change this. It's a "nicely formatted" version of the original PEP 8 document with the goal to make this wonderful Python style guide more accessible and easier to share.
    pep8.org is an open-source project that was started by Kenneth Reitz, the creator of Requests and many other popular Python packages. I was happy to bump into Kenneth at PyCon 2017 (because he's one of my personal "Python heroes") and in the course of that I became a co-maintainer for pep8.org and brought it up to date and made some small fixes to the website over the last couple of days.
    In this video you'll see how pep8.org can help you write cleaner and more beautiful Python code that follows the PEP 8 community style guide.
    Here's how to find it:
    → pep8.org
    → github.com/kennethreitz/pep8.org
    * * *
    ► Subscribe to this channel: dbader.org/youtube/
    ► Free Python Articles & Tutorials: dbader.org/newsletter

ความคิดเห็น • 53

  • @noisycarlos
    @noisycarlos 6 ปีที่แล้ว +165

    Sooo the document to make Python easier to read, needs to be reformatted to be easier to read.

    • @googleuser4203
      @googleuser4203 6 ปีที่แล้ว +13

      Ohh the ironyyyyyy

    • @markhathaway9456
      @markhathaway9456 5 ปีที่แล้ว +7

      like bugs on your deployment day

    • @Moalli14
      @Moalli14 5 ปีที่แล้ว +7

      I myself as a complete beginer (1 month into programming) found PEP-8 kinda hard to understand and apply, and that's hampering me on learning Python with correct and concise style from day one.
      Still, it's pretty good to have that kind of document so easily avaliable, but reformatting it would help a bunch of beginers to learn Python the right way from the start, not acquiring "vices" that need to be removed afterwards.

    • @destiny_02
      @destiny_02 3 ปีที่แล้ว +4

      The whole python documentation need that. It looks like some school kid made that website.

  • @martinchamambo
    @martinchamambo 7 ปีที่แล้ว +6

    This is good , saves me time from looking up the original pep guide via google and this was definitely done for humans ,thanx dbader .... and for the record ,i love your articles

  • @parthpanchal1620
    @parthpanchal1620 4 ปีที่แล้ว +1

    Hey, dan!! I love your blogs and emails. it saves my time. great work.

  • @simplegupta7154
    @simplegupta7154 6 ปีที่แล้ว +9

    There are lots of things in Python to be learn and it's nice that you are summarizing them. Keep going. 🙂

    • @realpython
      @realpython  6 ปีที่แล้ว

      I'm glad you are enjoying it!

  • @MADPURO
    @MADPURO 6 ปีที่แล้ว +4

    DEEEEEFinately going to check it out. I’ve been trying to get use to reading the python documentation and this might just send me over the edge in excitement.

    • @realpython
      @realpython  6 ปีที่แล้ว +1

      Happy to help!

  • @rajarshiroy8794
    @rajarshiroy8794 4 หลายเดือนก่อน

    I literally love it, I don't know why but I never heard of this pep8 style guide until recently when I searched how to write production level code. I wish I know it sonner, I am definetly going to share it in my circle

  • @Oladipupo_
    @Oladipupo_ 3 ปีที่แล้ว

    Thanks for this Dan

  • @dentonhess5810
    @dentonhess5810 3 ปีที่แล้ว

    Great information flow. TY

  • @jasonlloyd806
    @jasonlloyd806 7 ปีที่แล้ว

    awesome work!

  • @Silvertestrun
    @Silvertestrun 6 หลายเดือนก่อน +1

    Thank you!

  • @shahrokhabbasirad2223
    @shahrokhabbasirad2223 5 ปีที่แล้ว +1

    Thanks for your nice video. I was wondering if we need to be worried about this? coz you can install pylon package for example and everything will be conformed to PEP8 style. Am I right?

  • @aka5
    @aka5 3 ปีที่แล้ว +33

    me: pep
    Real Python: peepee

    • @Hshjshshjsj72727
      @Hshjshshjsj72727 3 ปีที่แล้ว

      LOL I think maybe he likes saying it 😏

    • @BM-uf4pp
      @BM-uf4pp 3 ปีที่แล้ว

      haha this had me laughing so hard

  • @RC-bl2pm
    @RC-bl2pm 6 ปีที่แล้ว +3

    Stone cold noob here..just started looking at pep and then saw this. Way easier to read! Thanks for the lifeline.

    • @realpython
      @realpython  6 ปีที่แล้ว

      You're welcome! Happy to help. :)

    • @MADPURO
      @MADPURO 6 ปีที่แล้ว

      R C how’s it going so far? Have you kept learning python?

    • @RC-bl2pm
      @RC-bl2pm 6 ปีที่แล้ว +1

      yeah i have. I got through a full course of python and began with flask. This opened a big hornets nest of problems! I am now simultaneously learning html/css and sqlite because a web page is more than flask and python! DRAT! I did manage to get a one page static toehold up at pythonanywhere and am currently working on a grocery list app locally for later deployment(again as an exercise). So much to learn and the first look at something new can be confusing but its really fun.

    • @MADPURO
      @MADPURO 6 ปีที่แล้ว

      R C that’s awesome to hear man! Congrats. I know how you feel after finding out with html and css lol. Those two were the stepping stones that started my learning journey. Although I’ve only done a tribute page with html, css, and js..I am interested in seeing how it goes learning python. I’m at 45% in a udemy course and so far I learned about using Jupyter and manipulating csv,JSON..etc. Is your site visible? I feel it’s motivating knowing someone else at similar a level lol.

    • @RC-bl2pm
      @RC-bl2pm 6 ปีที่แล้ว

      ryancross.pythonanywhere.com/
      just a single static page...not much but i managed to get through some html/css/flask and to get it up on pythonanywhere! I, m working on an app now that will require forms and a database and Im dying because im so buried. are you taking timbuchalkas udemy course? I have that course but went through treehouse first time which is too bad because udemy was better.

  • @heshankumarasinghe3159
    @heshankumarasinghe3159 3 ปีที่แล้ว

    Thanks.... Like the new site....

  • @webapplicationguide3798
    @webapplicationguide3798 7 ปีที่แล้ว +1

    Hi Dan,
    Is flake8 following pep8 style guide , just like pylint.

  • @sabuein
    @sabuein 3 ปีที่แล้ว

    Thank you.

  • @kunalsoni7681
    @kunalsoni7681 3 ปีที่แล้ว

    Helpful video ☺️❤️🤠

  • @PeterKirwan
    @PeterKirwan 5 ปีที่แล้ว

    A great resource! Just a heads up that a redirect needs to be set up from the http to the https :)

  • @pineapplepizza6045
    @pineapplepizza6045 3 ปีที่แล้ว

    That is just great!!! Thanks for sharing. I should go to bed now but instead I’ll start reading now 😂😂

  • @HG-mt3vl
    @HG-mt3vl 5 ปีที่แล้ว +3

    Great introduction video.. please make some detailed video demonstrating typing of real code by pep-8

    • @realpython
      @realpython  5 ปีที่แล้ว

      I appreciate the suggestion!

  • @apdy27
    @apdy27 3 ปีที่แล้ว

    Pep8ing the pep8!

  • @merchantscape
    @merchantscape 6 ปีที่แล้ว +7

    the cursive font type makes reading the comments in the code hard!

    • @MADPURO
      @MADPURO 6 ปีที่แล้ว +2

      merchantscape might be a pain in the butt..but I think you can view the source code and change the font if you’re on a laptop/pc by changing it through css. Depends how it was done of course. Although of course it won’t stay to what you change it to but if you’re gonna have it open..it’ll remain until then. I’m gonna try it later and see.

  • @danielrhouck
    @danielrhouck 2 ปีที่แล้ว +1

    I don’t think I’ve ever heard anyone spell out P-E-P before, instead of reading it as a word. Is that typical and I’m the weird one?

  • @alexpasko1126
    @alexpasko1126 6 ปีที่แล้ว

    "Make you code look like >everyone< else's code" hahahaha if only it was true!

    • @Neoplasie1900
      @Neoplasie1900 5 ปีที่แล้ว

      At least everyone has a common ground. There are virtually infinite ways to write code that accomplishes a tasks. PEP8 throws out the really bad stuff and makes code more readable regardless of coding style applied thereafter.

    • @abdullahalumran4653
      @abdullahalumran4653 4 ปีที่แล้ว

      I don't think you got the point.

  • @sreehari563
    @sreehari563 3 ปีที่แล้ว

    The only problem is that I just cannot use 4 spaces instead of one tab. I am too lazy and I really don't want to do that. Will that be a problem? Are spaces mandatory or in other words do every professional Python programmer who follows the style guide press down 4 spaces instead of one tab every single time?

    • @therealspikebh
      @therealspikebh 2 ปีที่แล้ว +1

      You can config that in the IDE, tab = 4 spaces

    • @sreehari563
      @sreehari563 2 ปีที่แล้ว

      @@therealspikebh yes, sometime after writing this comment, I figured out how to do this while using VS Code. Thanks for the reply 👍. But on notepad and other traditional text editors like Vim/EMACS I think, you have no option but to keep pressing space four times.

    • @therealspikebh
      @therealspikebh 2 ปีที่แล้ว

      @@sreehari563 i didnt know about emacs or a normal editor, i never checked out if pycharm has that kption though

    • @sreehari563
      @sreehari563 2 ปีที่แล้ว

      @@therealspikebhpretty sure that pycharm will have it too👍. I think a wide majority of programmers are now using IDE's instead of text editors, so everyone should be able to enjoy the ease of pressing tab for 4 spaces

  • @johncollins8141
    @johncollins8141 3 หลายเดือนก่อน

    yeah @1:48 the style guide to enhance py code readability is hard to read .....

  • @gauravmarwaha8466
    @gauravmarwaha8466 4 ปีที่แล้ว

    domain expired...!!!!

  • @monad99
    @monad99 20 วันที่ผ่านมา

    it's not pp8 it's pEp8

  • @adkharu
    @adkharu 5 ปีที่แล้ว +1

    The irony...