Exceptions in Python - Advanced Python 09 - Programming Tutorial

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

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

  • @chandrachurmukherjeejucse5816
    @chandrachurmukherjeejucse5816 Год назад

    Thanks for the crisp, clear and to the point tutorial. 🙏🏻

  • @mauriciocascante4312
    @mauriciocascante4312 Год назад

    Dude you are an EXCELLENT TEACHER!!! Congrats

  • @caiyu538
    @caiyu538 2 года назад +3

    clear explanation. Great.

  • @Loys2020
    @Loys2020 2 года назад +2

    Thanks for this awesome tutorial, right on point!

  • @turugasairam2886
    @turugasairam2886 Год назад +1

    Thank you. Cant thank enough.

  • @nitishjawahar4186
    @nitishjawahar4186 Год назад

    excellent!!!

  • @TomaszBI
    @TomaszBI Месяц назад

    I don't get why we need to create class. Can't we use just function 'test_value' ??

  • @carlolam3371
    @carlolam3371 5 лет назад +2

    is exception a good use to get out of a while true loop?

    • @patloeber
      @patloeber  5 лет назад +4

      Hi. Exceptions make your program crash and should be avoided. If there is still a possibility for exceptions you should handle them in the except block. But it is not intended to get out of a while True loop. You can use a `break`statement to get out of a loop instead.

    • @carlolam3371
      @carlolam3371 5 лет назад

      Python Engineer thanks , i have seen code that use custom exemptions to get out of while loops and take care of the exception on an except block. I see that happening when calling an inherited class function.

    • @patloeber
      @patloeber  5 лет назад +1

      Ok I see the point. It is definitely good to check for edge cases and raise exceptions that are then handled in an except block. But what if there is no exception? Then your while True loop will run forever...So there should be additional mechanisms to get you out of the loop, and the main goal of the raised exception should not be to get you out of the loop but to check for errors.

    • @carlolam3371
      @carlolam3371 5 лет назад +1

      @@patloeber thank you! good videos! very informative and useful.

  • @fartzy
    @fartzy 2 года назад +1

    I love you so much

  • @mohammedalaaraj2285
    @mohammedalaaraj2285 3 года назад

    Is raising an exception the same as raising a valueerror

  • @frankrobert9199
    @frankrobert9199 Год назад

    great

  • @rv7974
    @rv7974 4 года назад

    Maybe you would like to make a video about Classes?))

    • @patloeber
      @patloeber  4 года назад

      Thanks for the suggestion! I will add it to my list

  • @bluehydrademon719
    @bluehydrademon719 2 года назад

    This is not advanced

  • @drnotebook
    @drnotebook 3 года назад +1

    Change the name for this video series. This is beginner stuff. Don't
    lie to people by calling it advanced. You lose your credibility from
    the start when you LIE to people right from the start.

    • @johnnyhicks8791
      @johnnyhicks8791 2 года назад +2

      To know how to something works is the basic, how to implement it in the right way is advanced, at least that's my opinion.