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.
1 parent 0be380b commit c3c54bfCopy full SHA for c3c54bf
semver.py
@@ -118,8 +118,7 @@ def wrapper(*args, **kwargs):
118
else:
119
msg.append("Use the respective 'semver.VersionInfo.{r}' instead.")
120
121
- # hasattr is needed for Python2 compatibility:
122
- f = func.__qualname__ if hasattr(func, "__qualname__") else func.__name__
+ f = func.__qualname__
123
r = replace or f
124
125
frame = inspect.currentframe().f_back
@@ -317,9 +316,7 @@ def to_dict(self):
317
316
318
def __iter__(self):
319
"""Implement iter(self)."""
320
- # As long as we support Py2.7, we can't use the "yield from" syntax
321
- for v in self.to_tuple():
322
- yield v
+ yield from self.to_tuple()
323
324
@staticmethod
325
def _increment_string(string):
0 commit comments