We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

More Than You Ever Wanted To Know About Python Functions

Formal Metadata

Title
More Than You Ever Wanted To Know About Python Functions
Title of Series
Number of Parts
132
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
What exactly are functions? Let's talk about functions, methods, callables and closures - what they are, what you can give them, what they can give you, what you can do with them ... and what's inside. You probably think you already know everything about functions, but you probably don't! Input & Output: How do you get things in and out of functions? I'll cover parameters and the myriad of ways they can be specified, provided and accessed - including helpful hints to avoid common mistakes! I'll cover return values, briefly, along with variable scopes and exceptions. Closures: What are they, how do they work and how they can affect memory usage. Methods: How does a method differ from a function, when are they made, how do they work and how to access the function inside every method. __magic__:Make your own callables from any object! Introspection: Using modern Python techniques, what can you find out about a function, and what can you do with that information? Bytecode: What happens if you open up a function and look at its insides? Can you change it and put it back together again? (Spoiler: Yes, you can.) By the end of this talk, I guarantee* you'll know more about callables than when you walked in, along with techniques both practical and so extreme your colleagues will never let you merge them to master. (*This guarantee is legally non-binding and cannot be redeemed in any way.)