# Python Inner Functions: What Are They Good For?

DevFeed: [Python Inner Functions: What Are They Good For?](<https://devfeed.tech/articles/python-inner-functions-what-are-they-good-for-60467.md>)

Original publisher: [Read original article](<https://realpython.com/inner-functions-what-are-they-good-for/>)

Author: Leodanis Pozo Ramos

Published: 2026-09-26T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [closure](<https://devfeed.tech/tags/closure.md>), [decorators](<https://devfeed.tech/tags/decorators.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

This tutorial explains Python inner functions and their uses, including accessing names in an enclosing scope, building closures that retain state across calls, and creating decorators that extend callable behavior.

## Source excerpt

Learn what a Python inner function is good for: accessing nonlocal names, building stateful closures, and writing your own decorators.