meta: initial commit (archival)
This commit is contained in:
31
string_sum/usage.py
Normal file
31
string_sum/usage.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import string_sum
|
||||
|
||||
|
||||
class CustomClass:
|
||||
x: int
|
||||
|
||||
def repeat(self, word: str) -> str:
|
||||
return (word + " ")*self.x
|
||||
|
||||
def use_my_custom_class(custom: CustomClass) -> int:
|
||||
return custom.x
|
||||
|
||||
async def main():
|
||||
print("here we go")
|
||||
|
||||
instance = CustomClass()
|
||||
instance.x = 8
|
||||
barks = string_sum.do_something(instance)
|
||||
print(f"{barks=}")
|
||||
|
||||
num = string_sum.run_this_function(use_my_custom_class, instance)
|
||||
print(f"{num=}")
|
||||
|
||||
# ret = await get_average_coordinate()
|
||||
|
||||
# print(f"{ret=}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
from asyncio import run
|
||||
|
||||
run(main())
|
Reference in New Issue
Block a user