37 - Inner / Nested Functions ( challenge answer ) | Python Tutorials

preview_player
Показать описание
Tells what and why you would want to use an inner or nested function. This video goes over: some encapsulation, factory functions, and wrapper functions.

| Language
Python (.py)

| Code Example
Рекомендации по теме
Комментарии
Автор

I cannot believe this isn't way more popular. This is much more complete and usable code

stephenbouldin
Автор

great vedio you explain this way better than a lot of books and my lecturer. Thanks so much

Ian
Автор

Thank you for the tutorials. I'm not fully understanding the passing of arguments here..

You assigned 'make_is_divisible(2)' to the variable 'is_div_2'.
You then passed an argument to 'is_div_2' but I don't understand how 'is_div_2' knows that you want this argument to be passed to the 'num' parameter in 'def is_divisible' as 'is_divisible' isn't called.

Would really appreciate some help on this.

Gazumbo
Автор

Why don't just put codes of wrapper function inside time_this, why do we need to create a wrapper function just to return it?

yaoli
Автор

Can a u ples help me make a python keylogger virus I will play you

ajinmohamed