Skip to content

Instantly share code, notes, and snippets.

View nehavari's full-sized avatar
🎯
Focusing

Neha Vari nehavari

🎯
Focusing
View GitHub Profile
@DmitrySoshnikov
DmitrySoshnikov / python-closures.py
Created November 15, 2010 12:03
Understanding Python's closures
# "Understanding Python's closures".
#
# Tested in Python 3.1.2
#
# General points:
#
# 1. Closured lexical environments are stored
# in the property __closure__ of a function
#
# 2. If a function does not use free variables