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
- Host: GitHub
- URL: https://github.com/besnik/pycon2017-closures
- Owner: besnik
- Created: 2017-03-09T17:46:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T10:49:48.000Z (almost 5 years ago)
- Last Synced: 2025-02-27T05:30:02.830Z (over 1 year ago)
- Topics: 2017, closure, pycon, python
- Language: Python
- Size: 971 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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:
[](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.