Add vision of Python API
This commit is contained in:
parent
b273772722
commit
a09b71cdb3
2 changed files with 62 additions and 3 deletions
18
main.py
18
main.py
|
@ -1,5 +1,19 @@
|
|||
#!/bin/env python
|
||||
from pyority_queue import sum_as_string
|
||||
from pyority_queue import PureQueue, KeyedQueue
|
||||
|
||||
|
||||
print(sum_as_string(10, 15))
|
||||
def main() -> None:
|
||||
pure = PureQueue()
|
||||
pure["second"] = 3.4
|
||||
pure["first"] = 1.2
|
||||
pure["third"] = 5.6
|
||||
print(*pure)
|
||||
|
||||
keyed = KeyedQueue({"third": 5.6, "second": 3.4, "first": 7.8})
|
||||
del keyed["third"]
|
||||
keyed["first"] = 1.2
|
||||
print(*keyed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue