Skip to content

Instantly share code, notes, and snippets.

View gopass2002's full-sized avatar

Seonghyun Jeong gopass2002

  • coupang
  • South Korea
View GitHub Profile
@gopass2002
gopass2002 / python-closures.py
Last active September 1, 2015 07:22 — forked from DmitrySoshnikov/python-closures.py
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