cmp3 0.5.0__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cmp3-0.5.0/src/cmp3.egg-info → cmp3-0.6.0}/PKG-INFO +1 -1
- {cmp3-0.5.0 → cmp3-0.6.0}/pyproject.toml +1 -1
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3/core/__init__.py +10 -3
- {cmp3-0.5.0 → cmp3-0.6.0/src/cmp3.egg-info}/PKG-INFO +1 -1
- {cmp3-0.5.0 → cmp3-0.6.0}/LICENSE.txt +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/MANIFEST.in +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/README.rst +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/setup.cfg +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3/__init__.py +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3/tests/__init__.py +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3/tests/test_1984.py +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3.egg-info/SOURCES.txt +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3.egg-info/dependency_links.txt +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3.egg-info/requires.txt +0 -0
- {cmp3-0.5.0 → cmp3-0.6.0}/src/cmp3.egg-info/top_level.txt +0 -0
|
@@ -3,7 +3,14 @@ from typing import *
|
|
|
3
3
|
|
|
4
4
|
import setdoc
|
|
5
5
|
|
|
6
|
-
__all__ = ["CmpABC", "cmpDeco"]
|
|
6
|
+
__all__ = ["CmpABC", "cmp", "cmpDeco"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def cmp(x: Any, y: Any, /, *, mode: str = "portingguide") -> int:
|
|
10
|
+
"This function returns a value that compares to 0 as x compares to y."
|
|
11
|
+
if mode == "portingguide":
|
|
12
|
+
return (x > y) - (x < y)
|
|
13
|
+
raise ValueError
|
|
7
14
|
|
|
8
15
|
|
|
9
16
|
def cmpDeco(cls: type, /) -> type:
|
|
@@ -50,13 +57,13 @@ def cmpDeco(cls: type, /) -> type:
|
|
|
50
57
|
except AttributeError:
|
|
51
58
|
pass
|
|
52
59
|
try:
|
|
53
|
-
func.__qualname__ = cls.__qualname__
|
|
60
|
+
func.__qualname__ = f"{cls.__qualname__}.{func.__name__}"
|
|
54
61
|
except AttributeError:
|
|
55
62
|
pass
|
|
56
63
|
return cls
|
|
57
64
|
|
|
58
65
|
|
|
59
|
-
@
|
|
66
|
+
@cmpDeco
|
|
60
67
|
class CmpABC(ABC):
|
|
61
68
|
__slots__ = ()
|
|
62
69
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|