diff options
Diffstat (limited to 'doc/data/messages/n/nonlocal-without-binding/good.py')
-rw-r--r-- | doc/data/messages/n/nonlocal-without-binding/good.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/data/messages/n/nonlocal-without-binding/good.py b/doc/data/messages/n/nonlocal-without-binding/good.py index c40beb573..cce884ac8 100644 --- a/doc/data/messages/n/nonlocal-without-binding/good.py +++ b/doc/data/messages/n/nonlocal-without-binding/good.py @@ -1 +1,5 @@ -# This is a placeholder for correct code for this message. +class Fruit: + colors = ["red", "green"] + + def get_color(self): + nonlocal colors |