Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46131a9

Browse files
committed
changed cbooks reversed to agree with the python builtin
svn path=/trunk/matplotlib/; revision=3871
1 parent ff84403 commit 46131a9

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

API_CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Changed cbook.reversed so it yields a tuple rather than a
2+
(index, tuple). This agrees with the python reversed builtin,
3+
and cbook only defines reversed if python doesnt provide the
4+
builtin.
5+
16
Made skiprows=1 the default on csv2rec
27

38
The gd and paint backends have been deleted.

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2007-09-21 Changed cbook.reversed to yield the same result as the
2+
python reversed builtin - DSD
3+
14
2007-09-13 The usetex support in the pdf backend is more usable now,
25
so I am enabling it. - JKS
36

lib/matplotlib/cbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def reversed(seq):
482482
enumerate() is new in Python 2.3
483483
"""
484484
for i in range(len(seq)-1,-1,-1):
485-
yield i, seq[i]
485+
yield seq[i]
486486

487487

488488
# use itertools.izip if available, else use python version

0 commit comments

Comments
 (0)