Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.35 KB

readme.md

File metadata and controls

49 lines (33 loc) · 1.35 KB

Closures in Python

This is supportive material for my talk Closures in Python presented at PyCon SK 2017 in Bratislava, Slovakia.

Watch now on youtube:

Closures in Python

The aim of talk was to introduce closures concent in general to the audience.

Presentation includes examples also from other languages like Java, C# or Javascript.

Slides

Check out pycon2017-closures.pdf in root folder.

Folder structure

  • python - contains examples in python
  • js - contains examples in javascript / node.js
  • csharp - contains examples in C#, .NET (Core)
  • java - contains examples in Java 8

Agenda

  1. Introduction, Bottom-Up explanation
  2. Pool - usage of python, java, c#, javascript
  3. Question - example with list of functions (10,10,10...10)
  4. Scopes (local vs global variables)
  5. Functions as first class citizen
  6. Lambdas
  7. Classes (vs Functions)
  8. Simple example of closure
  9. Where is closed variable stored, GC discussion
  10. More closures examples (counter, average)
  11. Closures with functions
  12. Decorators, combined decorators
  13. Closures vs Classes
  14. Answer to initial question
  15. Answer in C#, Java
  16. Answer in Javascript
  17. Q&A

Support

In case of questions do not hesitate to contact me. Feel free to send patch or pull request.