Skip to content

Commit da4d23c

Browse files
authored
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) <map object at 0x1031e74c0> >>> [len(plane) for plane in planes] [0, 1, 2, 3] ```
1 parent 0b65d6a commit da4d23c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ Converting images:
8888
>>> img2.get_pixel_format()
8989
'yuv420p'
9090
>>> planes = img2.to_bytearray()
91-
>>> map(len, planes)
91+
>>> [len(plane) for plane in planes]
9292
[50000, 12500, 12500, 0]

0 commit comments

Comments
 (0)