Closed odashi closed 1 year ago
Thank you! I think this is a reasonable change, but I do feel that the semantics of none and the empty list or dictionary are a little bit different in some of these cases. None generally refers to " has not been calculated yet " we're an empty list or dictionary more indicates that it has been calculated but is empty. Do you think it would be better to remove this implicit distinction? Of course we could make it explicit where necessary, but that adds a bit of complexity to the code
None generally refers to " has not been calculated yet " we're an empty list or dictionary more indicates that it has been calculated but is empty.
I'm not sure this is really a general policy in Python, but I don't recommend giving any other meanings than "never" for None. It is actually confusing because the value does not say anything about the underlying semantics, and we need careful documentation about it.
I think SysOutputInfo
(for example) has too many information that are not necessary to be co-existed. Giving/passing this structure seems to confuse overall behavior of the library.
OK, sounds good, let's go ahead and remove the None
s then. I'll do the review soon.
This change removes several
Optional
and| None
annotations fromlist
anddict
types that can represent nothing by the empty collection. This change suppresses someunwrap
invocations from the codebase.This change also involves several typing fixes.