From c8f2cde9be0909cca9b166eedaea005efd2ac3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 28 Jan 2019 16:11:02 +0100 Subject: [PATCH] Nonlocal --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c46ddb..7b7ac2d 100644 --- a/README.md +++ b/README.md @@ -582,7 +582,7 @@ from functools import partial ```python def get_counter(): - a = 0 + a = 1 def out(): nonlocal a a += 1 @@ -593,7 +593,7 @@ def get_counter(): ```python >>> counter = get_counter() >>> counter(), counter(), counter() -(0, 1, 2) +(1, 2, 3) ```