update doc ex02
This commit is contained in:
@@ -2,7 +2,9 @@ def all_thing_is_obj(object: any) -> int:
|
|||||||
# https://docs.python.org/3.10/library/functions.html?highlight=type#type
|
# https://docs.python.org/3.10/library/functions.html?highlight=type#type
|
||||||
ofType = type(object)
|
ofType = type(object)
|
||||||
|
|
||||||
|
# https://docs.python.org/3.10/tutorial/controlflow.html#match-statements
|
||||||
match object:
|
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
|
||||||
case list():
|
case list():
|
||||||
print("List : ", ofType)
|
print("List : ", ofType)
|
||||||
case tuple():
|
case tuple():
|
||||||
|
|||||||
Reference in New Issue
Block a user