The Python Oracle

Why aren't python nested functions called closures?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzling Curiosities

--

Chapters
00:00 Question
00:47 Accepted answer (Score 430)
02:17 Answer 2 (Score 113)
06:33 Answer 3 (Score 79)
09:07 Answer 4 (Score 23)
09:58 Thank you

--

Full question
https://stackoverflow.com/questions/4020...

Answer 1 links:
[aaronasterling]: https://stackoverflow.com/users/376728/a...
[FREE VARIABLE]: https://stackoverflow.com/questions/1291...

Answer 2 links:
[function decorator pattern]: http://thecodeship.com/patterns/guide-to.../
[nonlocal]: https://docs.python.org/3/reference/simp...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #closures #nestedfunction

#avk47