We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sys.version_info
1 parent b6a4181 commit 0cadf77Copy full SHA for 0cadf77
comtypes/client/dynamic.py
@@ -1,4 +1,3 @@
1
-import sys
2
import ctypes
3
import comtypes.automation
4
import comtypes.typeinfo
@@ -158,21 +157,11 @@ class _Collection(object):
158
157
def __init__(self, enum):
159
self.enum = enum
160
161
- if sys.version_info >= (3, 0):
162
-
163
- def __next__(self):
164
- item, fetched = self.enum.Next(1)
165
- if fetched:
166
- return item
167
- raise StopIteration
168
169
- else:
170
171
- def next(self):
172
173
174
175
+ def __next__(self):
+ item, fetched = self.enum.Next(1)
+ if fetched:
+ return item
+ raise StopIteration
176
177
def __iter__(self):
178
return self
0 commit comments