afivmax
安装
pip install afivmax
使用
from afivmax.afivmax import afiv_max
# args
assert 3 == afiv_max(1, 2, 3)
assert 3 == afiv_max(3, 3, 3)
# args with key
assert 3 ==afiv_max(1, 2, 3, key=lambda x: x ** 2)
class TmpClass:
def __init__(self, x):
self.val = x
assert 9 == afiv_max(*[TmpClass(x) for x in range(10)], key=lambda x: x.val).val
# iterables
assert 3 == afiv_max([1, 2, 3])
assert 3 == afiv_max([3, 2, 1])
assert 3 == afiv_max([3])
# iterables with keys
assert 3 == afiv_max([1, 2, 3], key=lambda x: x ** 2)
assert 9 == afiv_max([TmpClass(x) for x in range(10)], key=lambda x: x.val).val
# iterables with default
assert 10 == afiv_max([], default=10), "iterable with default only"
Metadata
Release files for afivmax 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| afivmax-0.3.0.tar.gz | 2.8 kB | Details |
Release files / afivmax-0.3.0.tar.gz
| Download URL | afivmax-0.3.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a774d183d2be975800dd4ba739e48bb7cb88c545ea4b2e327fac5b9907efbc0
|
|
BLAKE2b-256 checksum How to use checksums |
91061f4b5089ce6da3b740a19b665fc426f4a3e3701521b1acf5794d3fc15afd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.5.6
|