An open API service indexing awesome lists of open source software.

https://github.com/besnik/pycon2017-closures

Slides and sample source code in Python, Java, C#, Javascript for talk Closures in Python @ Pycon SK 2017
https://github.com/besnik/pycon2017-closures

2017 closure pycon python

Last synced: 8 months ago
JSON representation

Slides and sample source code in Python, Java, C#, Javascript for talk Closures in Python @ Pycon SK 2017

Awesome Lists containing this project

README

          

# 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](https://img.youtube.com/vi/djY0-7jNQI0/0.jpg)](https://www.youtube.com/watch?v=djY0-7jNQI0)

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.