From 5fc979681c9bc5a185f32a117ae45721d341c9bd Mon Sep 17 00:00:00 2001 From: hugogogo Date: Sun, 26 Oct 2025 15:16:28 +0100 Subject: [PATCH] ex03 update case empty --- d00/ex03/NULL_not_found.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d00/ex03/NULL_not_found.py b/d00/ex03/NULL_not_found.py index 13b1cbd..ac403a4 100644 --- a/d00/ex03/NULL_not_found.py +++ b/d00/ex03/NULL_not_found.py @@ -8,12 +8,13 @@ def NULL_not_found(object: any) -> int: # (NaN == NaN) = false https://docs.python.org/3.10/reference/expressions.html#value-comparisons "A counter-intuitive implication is that not-a-number values are not equal to themselves" case float() if object != object: print("Cheese:", object, nullType) + # need check before int(), why ? case bool() if object == False : print("Fake:", object, nullType) case int() if object == 0 : print("Zero:", object, nullType) case str() if object == '' : - print("Empty:", object, nullType) + print("Empty:", nullType) case _: print("Type not Found") return 1