cmp3 0.5.1__py3-none-any.whl → 0.6.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
@@ -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,7 +57,7 @@ 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmp3
3
- Version: 0.5.1
3
+ Version: 0.6.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)
@@ -0,0 +1,9 @@
1
+ cmp3/__init__.py,sha256=hxvwX8wZhft-DkMAoU3xz65RMZib8nPQQiAbxba27iQ,49
2
+ cmp3/core/__init__.py,sha256=r1yN7-yrGmLOuCFSweCCeeJSkPadPWadY_1Nsx4HWZI,1713
3
+ cmp3/tests/__init__.py,sha256=HqmxhnTFFqh9Nzl7STV5GeDYqDmhrc9e1TCHssUbC1s,426
4
+ cmp3/tests/test_1984.py,sha256=_ami0cAP8vU0C8RpQhP1tLWnLFGTaeHlOG5O60RVKv8,222
5
+ cmp3-0.6.0.dist-info/licenses/LICENSE.txt,sha256=Jb9jm2E2hEO2LqnWwHeHt4cneyCbnZ1SBte0bgb9qoY,1074
6
+ cmp3-0.6.0.dist-info/METADATA,sha256=_hkXOIQ-WufmOue5Q9O4JOqSvyhmqvqRHfkHd9u6ANI,2300
7
+ cmp3-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ cmp3-0.6.0.dist-info/top_level.txt,sha256=FzJWsf0Xj_eeRJuFle30ZFjVZs8ahy7oLhYdWx8YkgA,5
9
+ cmp3-0.6.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- cmp3/__init__.py,sha256=hxvwX8wZhft-DkMAoU3xz65RMZib8nPQQiAbxba27iQ,49
2
- cmp3/core/__init__.py,sha256=kkgjHGopJt6yX77ArxFa9qdg5ChcREc2fOakmZ9wAic,1457
3
- cmp3/tests/__init__.py,sha256=HqmxhnTFFqh9Nzl7STV5GeDYqDmhrc9e1TCHssUbC1s,426
4
- cmp3/tests/test_1984.py,sha256=_ami0cAP8vU0C8RpQhP1tLWnLFGTaeHlOG5O60RVKv8,222
5
- cmp3-0.5.1.dist-info/licenses/LICENSE.txt,sha256=Jb9jm2E2hEO2LqnWwHeHt4cneyCbnZ1SBte0bgb9qoY,1074
6
- cmp3-0.5.1.dist-info/METADATA,sha256=QrULyddpHLn4urfhSrtu6iswu0F6PcQ0XaFqitpbkn4,2300
7
- cmp3-0.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- cmp3-0.5.1.dist-info/top_level.txt,sha256=FzJWsf0Xj_eeRJuFle30ZFjVZs8ahy7oLhYdWx8YkgA,5
9
- cmp3-0.5.1.dist-info/RECORD,,
File without changes