From da4d23cf2bbe77f0df989f419d74be3d8862b667 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 11 Jun 2025 13:01:22 +0200 Subject: [PATCH] README.rst: Fix a bug in Python code `map()` returned a list in Python 2 but returns a generator in Python 3. ```python >>> planes = ('', 'a', 'ab', 'abc') >>> map(len, planes) >>> [len(plane) for plane in planes] [0, 1, 2, 3] ``` --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7c4e5d6..57446fc 100644 --- a/README.rst +++ b/README.rst @@ -88,5 +88,5 @@ Converting images: >>> img2.get_pixel_format() 'yuv420p' >>> planes = img2.to_bytearray() - >>> map(len, planes) + >>> [len(plane) for plane in planes] [50000, 12500, 12500, 0]