[pywin32-checkins] /hgroot/pywin32/pywin32: use iter().next() instead of next(iter(...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2012-07-16 06:57:18
|
changeset c8d9bd8b3ca9 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=c8d9bd8b3ca9 summary: use iter().next() instead of next(iter()) for compat with 2.5- diffstat: com/win32com/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 48976afd6865 -r c8d9bd8b3ca9 com/win32com/__init__.py --- a/com/win32com/__init__.py Sun Jul 15 14:59:11 2012 -0400 +++ b/com/win32com/__init__.py Mon Jul 16 16:56:43 2012 +1000 @@ -90,7 +90,7 @@ # hrmph - 3.3 throws: TypeError: '_NamespacePath' object does not support indexing # attempting to get __path__[0] - but I can't quickly repro this stand-alone. # Work around it by using an iterator. - __gen_path__ = next(iter(sys.modules["win32com.gen_py"].__path__)) + __gen_path__ = iter(sys.modules["win32com.gen_py"].__path__).next() except ImportError: # If a win32com\gen_py directory already exists, then we use it # (gencache doesn't insist it have an __init__, but our __import__ |