5 Good Python Practices

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 33

  • @LucaCappelletta
    @LucaCappelletta 3 месяца назад +20

    Comments should describe why something has been done, not what has been done. Using expressive names for variables, functions, classes, etc and some experience it is possible to do so.
    A comment saying that a .split() splits a string is literally redundant

  • @purplemonkeydishwasher5269
    @purplemonkeydishwasher5269 7 дней назад

    Variable definition that includes the datatype is new to me! Thanks.

  • @softwareengineer8923
    @softwareengineer8923 3 месяца назад +4

    Such a useful and well detailed video, it has been a lovely recap. Thanks a lot👍

  • @ismile47
    @ismile47 Месяц назад +1

    Thank you in detail. Saved time.

  • @jimalix6270
    @jimalix6270 18 дней назад

    Excellent video! Thanks!

  • @cgarzs
    @cgarzs 2 месяца назад +2

    11:48 "mo comments mo better" all while a screenshot here would be exactly the kind of example the "good code is it's own comments" crowd would counter with 😂

  • @JHatLpool
    @JHatLpool 3 месяца назад

    Nice, clear demonstrations and explanations.

  • @guihprado3366
    @guihprado3366 3 месяца назад +1

    Awesome content as always 👏🏻

  • @sdmagic
    @sdmagic 3 месяца назад

    Nicely done. Thanks!

  • @DrDeuteron
    @DrDeuteron 3 месяца назад +4

    A comment on the comment section, unrelated to comments: it's pythonic to practice EAFP, while you implement LBYL!
    What that means is that you would unpack the split string straight into a dict, and don't even have "parts"--which is whole reason you need comment--and that would be in a try/except block for when you didn't look before you leapt.

  • @higiniofuentes2551
    @higiniofuentes2551 3 месяца назад

    Thank you for this very useful video!

  • @sri_harsha_dv
    @sri_harsha_dv 3 месяца назад

    16:18 Why doesn't "type" show while hovering but it was included in the docstring?

  • @higiniofuentes2551
    @higiniofuentes2551 3 месяца назад

    What I found with the new developers is they put names as the same of the function and the same for external variables:
    name(name:name).
    And they love to use the name name, and data everywhere!

  • @bigpapa21tx1
    @bigpapa21tx1 3 месяца назад

    parse_date variable and comment of expecting d / m / y as input would be the better approach. Everything else seems pretty straightforward

  • @Unknown_User12679
    @Unknown_User12679 3 месяца назад

    great explanation 🎉

  • @dipeshsamrawat7957
    @dipeshsamrawat7957 3 месяца назад

    Thank you 😊

  • @gio-j3d
    @gio-j3d 3 месяца назад +2

    pls explain requests libery

    • @venzdrop
      @venzdrop 3 месяца назад

      library*

  • @piedepew
    @piedepew 3 месяца назад +3

    Practices

  • @gardnmi
    @gardnmi 3 месяца назад +1

    this_is_redundant: bool = True

  • @TheBlueboyRuhan
    @TheBlueboyRuhan 3 месяца назад +17

    does it jiggle

  • @nickfg5190
    @nickfg5190 3 месяца назад +1

    18% GST on payment getways, if we use card sir, visa ke din gaye kay?

  • @Otherfox-be9up
    @Otherfox-be9up 3 месяца назад

    Simple: don't

  • @akcelero
    @akcelero 3 месяца назад

    hey hey, great material, keep that up!
    just wanted to share with you @idently potential topic for upcoming video: `__init_subclass__`
    recently I bumped into problem which I solved by this method so maybe other devs will found it useful

  • @FrankONeill-v3l
    @FrankONeill-v3l 3 месяца назад +1

    Python I want to love you. But so many times I find myself trapped in dependency hell attempting to make some linguistic sense out of the heap of semantic rubbish you spout so copiously onto the screen. Your package managers number greatly yet each only further confounds with idiomatic complexities and confused functionality. Your syntax proves often counter intuitive and brutally unforgiving with error messages that provoke my laughter at the very insanity of any further attempts resolve the issue. Most notably I scoff at that most frequent objection you give in stating that the poetry I write abuses the emptiness of whitespace and I laugh at your ignorance of the likes of E.E. Cummings and find your makers to be flawed as individuals given the grave handicap they imparted to you of uneducated 'tardness. So back I go to my tried and true love of PERL and I swear to one day become a greater poet true who can wield the more sophisticated expressions the elite of intelligentsia use in Raku.
    F.

  • @FrankONeill-v3l
    @FrankONeill-v3l 3 месяца назад +1

    Python is the most blue-collar and crude of scripts and languages. Use it like you would a toilet plunger yet beware the mess it so easily might make. Not a language conducive to sophisticated or elegant or creative expressions.