ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Why: Python Debugging, Stack Trace, Exception Handling, Try / Except & Raise? (W/ Mnemonics)

school

mooc

class

instructional

course

series

tutorials

lessons

learn

how-to

teach

teacher

education

beginners

instructor

examples

python

python 3.5

bee student

bee-student.com

programer

programming

dylan jorgensen

mnemonics

developer

code

udemy

program

coding

university

simple programmer

python (programming language)

beginner

teaching

3.5

computer science

2017

development

tutorial

python tutorial

crash course

learn python

python for beginners

how to

programming tutorial

Автор: Mnemonic Academy

Загружено: 2017-04-26

Просмотров: 1852

Описание: Get The Full “Learn Python 🐍” Online Course:
http://www.mnemonic.academy/learn-python

The following video is from an online educational course produced by Mnemonic Academy that teaches the basics of Python programming using mnemonics, metaphors and the science of learning titled “Learn Python: Like a Bee Student”, taught by instructor Dylan Jorgensen

What is a bug?
A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Bugs vs. Features?
Bugs can come in shades of grey if you don’t clearly define the functionality you want to achieve. -
Sometimes bugs become features.

What is debugging?
Debugging is the processing of smoothing out the bugs, once you have a clear definition of the functionality you want.
Debugging can be as simple as a print command that prints variables at certain points of a program. Or as complicated as introducing new complex debug code to test for subtle changes between your expected outputs and the true outputs.

What is a stack trace?
A stack trace is a report that reports at certain points in time during the execution of a program.
A stack trace is a list of the method calls that the application was in the middle of when an error occurred. (AKA: Exception was thrown.)

How to Read the Stack Trace?
Not every bug will have a stack trace, but many do and if they do then this means the bug is not on the surface but instead wrapped up deeper down.
Deeper down could mean the order the code is compiled. Or in a deeper scope like a function, or even in open sources modules imported.
So instead of starting at the top of our code we just start with our topmost method call and often this will get our attention close enough to the problem we can work through the rest.

What are exceptions?
Imagine if somebody passed in a string argument when your function only works with integers. Exception handling is how you deal with it.

What is the difference between a syntax error and an exception?
Syntax errors, also known as parsing error. These are syntax problems and I think of them as similar to misspelling.
Even if a statement or expression is syntactically correct, it may cause an error when an attempt is made to execute it.

What’s exception handling?
Exception handling is about making sure that you have variables that don't break your code in a way that is similar to our conditional section before.
Exception handling is the process of responding to an unwanted actions during either compile time or runtime.

What do the keywords try and except do?
Python gives us some conditional keywords to help find where our code goes wrong
First, the statements between the try and except keywords are executed. Then if no exception occurs, the except clause is skipped and execution of the try statement is finished.
If an exception occurs during execution the rest of the clause is skipped. Then if its type matches the exception named after the except keyword, the except clause is executed, and then execution continues after the try statement.

What does the keyword raise do?
Raise is a way to override the default exceptions in the way we want and display the information we want for the user.
Raise allows us to define our own type of exception errors.

What does the keyword finally do?
We can use the finally statement to ensure that a block of code is closed at the end of the file even if there is an exception that causes the interpreter to break.
A time when you might want to do this is when you need to close out an open file at the very end of your program no matter what.

Is there a way to group errors into runtime and compile time?
Error can be grouped into two different groups, one for run time and another for compile time.
Compile time errors happen when we feed a bunch of text to the compiler to convert it to machine code.


Photos under creative commons licence are links to the original source from the Learn Python: E-Book. https://goo.gl/BAMwi6, https://goo.gl/K1xRFv, https://goo.gl/9k2MY3

Interested in Learning More About Online Courses That Teach Using Mnemonics, Metaphors and the Science of Learning?

Checkout All Our Mnemonic Academy 🐝 Online Courses:
http://www.mnemonic.academy

Subscribe To Our Mnemonic Academy 🐝 YouTube Channel:
   / @curiousschool  

Like Our Mnemonic Academy 🐝 Facebook Page:
  / www.mnemonic.academy  

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Why: Python Debugging, Stack Trace, Exception Handling, Try / Except & Raise? (W/ Mnemonics)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

How-To: Debugging, Stack Trace, Exception Handling, Try / Except & Raise

How-To: Debugging, Stack Trace, Exception Handling, Try / Except & Raise

Why: Python Functions, Calling Function, Arguments & Parameters? (W/ Mnemonics)

Why: Python Functions, Calling Function, Arguments & Parameters? (W/ Mnemonics)

Exception Handling Tips in Python ⚠ Write Better Python Code Part 7

Exception Handling Tips in Python ⚠ Write Better Python Code Part 7

Python  - Полный Курс по Python [15 ЧАСОВ]

Python - Полный Курс по Python [15 ЧАСОВ]

threading vs multiprocessing in python

threading vs multiprocessing in python

#63 Python Tutorial for Beginners | Exception Handling

#63 Python Tutorial for Beginners | Exception Handling

Python Context Managers and the

Python Context Managers and the "with" Statement (__enter__ & __exit__)

Экспресс курс по python за 7 часов!

Экспресс курс по python за 7 часов!

Debugging with stack traces | Intro to CS - Python | Khan Academy

Debugging with stack traces | Intro to CS - Python | Khan Academy

python try except and best practices (beginner - intermediate) anthony explains #359

python try except and best practices (beginner - intermediate) anthony explains #359

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]