Catalog PyPI
Back to packageRELEASE DETAILS

0.3.0

PyPI

afivmax

Interview problem of Ant Fin

Published27 Jun 2019
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.3.0 documentation

afivmax

Build Status PyPI version Coverage Status Documentation Status

安装

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"

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
afivmax-0.3.0.tar.gz

sdist · 2.72 KB · Python source

Source file

Repository

PENDING
eggachecat/afivmax

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:6c42bf1fd3dd6a0bbc9ae978da86e656a3a57a4cac7137d50463875dd2e5ecde

Other collected versions

View all collected versions →