cmp3 0.6.5__py3-none-any.whl → 1.0.0__py3-none-any.whl

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/core/__init__.py CHANGED
@@ -8,6 +8,8 @@ __all__ = ["CmpABC", "cmp", "cmpDeco"]
8
8
 
9
9
  def cmp(x: Any, y: Any, /, *, mode: str = "portingguide") -> float | int:
10
10
  "This function returns a value that compares to 0 as x compares to y."
11
+ if mode == "dunder":
12
+ return x.__cmp__(y)
11
13
  if mode == "portingguide":
12
14
  return (x > y) - (x < y)
13
15
  if mode == "poset":
@@ -16,7 +18,7 @@ def cmp(x: Any, y: Any, /, *, mode: str = "portingguide") -> float | int:
16
18
 
17
19
 
18
20
  def cmp_poset(x: Any, y: Any, /) -> float | int:
19
- "This function returns a value that compares to 0 as x compares to y under the assumption that both arguments belong to a poset."
21
+ "This function returns a value that compares to 0 as x compares to y assuming a partial order."
20
22
  if x <= y:
21
23
  if y <= x:
22
24
  return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmp3
3
- Version: 0.6.5
3
+ Version: 1.0.0
4
4
  Summary: This project updates the concept of __cmp__ for python3.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -28,7 +28,7 @@ Project-URL: Download, https://pypi.org/project/cmp3/#files
28
28
  Project-URL: Index, https://pypi.org/project/cmp3/
29
29
  Project-URL: Source, https://github.com/johannes-programming/cmp3/
30
30
  Project-URL: Website, https://cmp3.johannes-programming.online/
31
- Classifier: Development Status :: 3 - Alpha
31
+ Classifier: Development Status :: 5 - Production/Stable
32
32
  Classifier: License :: OSI Approved :: MIT License
33
33
  Classifier: Natural Language :: English
34
34
  Classifier: Operating System :: OS Independent
@@ -1,5 +1,5 @@
1
1
  cmp3/__init__.py,sha256=hxvwX8wZhft-DkMAoU3xz65RMZib8nPQQiAbxba27iQ,49
2
- cmp3/core/__init__.py,sha256=_xdO8zsRzwDegppawfT3zohm6xSHt5KC7C9jELqRYXQ,2199
2
+ cmp3/core/__init__.py,sha256=0d14ZCHAxAsBJInqsf5Df-dOd7sRV03y7sPtQdazuMs,2218
3
3
  cmp3/tests/__init__.py,sha256=HqmxhnTFFqh9Nzl7STV5GeDYqDmhrc9e1TCHssUbC1s,426
4
4
  cmp3/tests/test_all_TestCmpABCAndDeco.py,sha256=EElYxpmx-8ykN3oZAbncc5yEGnzrDBasnEjdpUen9co,1783
5
5
  cmp3/tests/test_all_TestCmpFunction.py,sha256=m20CG6ScKHqwCu9fM_1xH02P50PXxDAEhXi929e7jfM,1038
@@ -9,8 +9,8 @@ cmp3/tests/test_core_TestCmpDecoOnPlainClass.py,sha256=Ggx5N7ubJ1eMUggbcdDVNkhwt
9
9
  cmp3/tests/test_core_TestCmpModePoset.py,sha256=dUpZRKsbqtfUQL2Q5MwVgluqHDm_i2oMcq9AkrR4Wiw,453
10
10
  cmp3/tests/test_core_TestCmpPortingGuide.py,sha256=9Qskz2Ug0VDkL1wIRVu-bURLDeNfjCB5e9cOwKtkrXs,740
11
11
  cmp3/tests/test_core_TestCmpPoset.py,sha256=CGt7BwdjqRyoOwp8CAdgOVwUQm7_PVkcHgZZMO2J7dM,819
12
- cmp3-0.6.5.dist-info/licenses/LICENSE.txt,sha256=Jb9jm2E2hEO2LqnWwHeHt4cneyCbnZ1SBte0bgb9qoY,1074
13
- cmp3-0.6.5.dist-info/METADATA,sha256=_nQX67lTP4kFjdZjyHd89WVL71bYgKNgQZBdm_0iXgw,2300
14
- cmp3-0.6.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
- cmp3-0.6.5.dist-info/top_level.txt,sha256=FzJWsf0Xj_eeRJuFle30ZFjVZs8ahy7oLhYdWx8YkgA,5
16
- cmp3-0.6.5.dist-info/RECORD,,
12
+ cmp3-1.0.0.dist-info/licenses/LICENSE.txt,sha256=Jb9jm2E2hEO2LqnWwHeHt4cneyCbnZ1SBte0bgb9qoY,1074
13
+ cmp3-1.0.0.dist-info/METADATA,sha256=afthtZyNRb43Iqo7gXGt67OP-m7QgXcgMtrnDzdvWGg,2312
14
+ cmp3-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
+ cmp3-1.0.0.dist-info/top_level.txt,sha256=FzJWsf0Xj_eeRJuFle30ZFjVZs8ahy7oLhYdWx8YkgA,5
16
+ cmp3-1.0.0.dist-info/RECORD,,
File without changes