Git Product home page Git Product logo

pycon2017-closures's Introduction

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.

pycon2017-closures's People

Contributors

besnik avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.