filmov
tv
Capturing a function's LOCAL variables?!

Показать описание
Trust me, this does actually have a use case! You would ordinarily not be able to access the local variables of a function unless you returned them, but this function captures the internal state of the decorated function at return time, allowing you to verify it's what it should be! Very neat, but definitely a hack!
00:00 - Intro [1]
01:06 - Demonstration [2]
03:13 - Implementing the capture function [3]
10:02 - Strongly typed example
10:45 - Where would you use this?
14:22 - Outro
—
If you want to see more of me, join my Discord server!
I get a lot of people asking, so here's my setup!
Affiliations (I may earn a commission):
—
If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
#python #coding #howto
00:00 - Intro [1]
01:06 - Demonstration [2]
03:13 - Implementing the capture function [3]
10:02 - Strongly typed example
10:45 - Where would you use this?
14:22 - Outro
—
If you want to see more of me, join my Discord server!
I get a lot of people asking, so here's my setup!
Affiliations (I may earn a commission):
—
If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
#python #coding #howto
What are Local variables, functions & types in C# 9.0?
Understanding the Scope of Lambda Functions in C++: Capturing Temporary Variables by Reference
Solving the C+ + Lambda Local Variable Capturing Error in AVL Trees
Capturing Variable Assignments in R Functions Using utils::dump.frames
Local Variables in Matlab
C++ : C++11 lambda capture `this` and capture local variables by value
How to Properly Access and Use Variables in Python Functions
How do closures power nested #functions in Python? Master Nested #functions with Closures in Python!
local variable in lambda expression
Local Variable vs FGV - IndLUG
AppleScript tutorial 8 - Handlers (functions) and variable scope
Understanding the use of local variable with automatic storage from containing function Error in C++
Overloading a Function in TypeScript: Capturing Static Variables
Class 10 22 19 Passing Variables Between Functions
How to Share Variables Between Functions in C++
Finding a Way to Access a Local Variable in a Child Function from Parent Function in Bash
How to Pass the Value of a Variable Instead of a Reference into a Function in JavaScript
How to Pass Object Keys as Local Variables in JavaScript Functions
C++ Local Global Variable Scopes | CPP Video Tutorial
JAVA 8 - CAN I UPDATE LOCAL VARIABLE INSIDE A LAMBDA EXPRESSION EFFECTIVELY FINAL | INTERVIEWDOT
Accessing Variables in the Local Scope of a Python Decorator: A Deep Dive into Closures
Variable Capture Intro
Global Variables and Local Variables in PowerShell
How to Reuse Variables from Functions in C# Windows Forms Applications
Комментарии