norminette

This commit is contained in:
hugogogo
2025-10-28 21:33:13 +01:00
parent 17b1da0822
commit 1ebc36c197
9 changed files with 53 additions and 29 deletions

View File

@@ -4,7 +4,8 @@ def all_thing_is_obj(object: any) -> int:
# https://docs.python.org/3.10/tutorial/controlflow.html#match-statements
match object:
# class patterm : check against a class (check if instance when empty arguments) https://docs.python.org/3/reference/compound_stmts.html#class-patterns
# class pattern, against a class (or instance if empty arguments):
# https://docs.python.org/3/reference/compound_stmts.html#class-patterns
case list():
print("List : ", ofType)
case tuple():
@@ -17,4 +18,4 @@ def all_thing_is_obj(object: any) -> int:
print(object + " is in the kitchen : ", ofType)
case _:
print("Type not found")
return 42
return 42

View File

@@ -3,7 +3,7 @@ from find_ft_type import all_thing_is_obj
ft_list = ["Hello", "tata!"]
ft_tuple = ("Hello", "toto!")
ft_set = {"Hello", "tutu!"}
ft_dict = {"Hello" : "titi!"}
ft_dict = {"Hello": "titi!"}
all_thing_is_obj(ft_list)
all_thing_is_obj(ft_tuple)
@@ -11,4 +11,4 @@ all_thing_is_obj(ft_set)
all_thing_is_obj(ft_dict)
all_thing_is_obj("Brian")
all_thing_is_obj("Toto")
print(all_thing_is_obj(10))
print(all_thing_is_obj(10))