
Aug. 29, 2019
2:56 p.m.
I try with +foo in place of ~foo.
+foo seems a lot better to me than ~foo, but i still lean towards `foo | None` as "good enough". it's 3 fewer characters than `Optional[foo]`, or 30 fewer if you include the full removal of `from typing import Optional`. the additional gain of +foo is only 6 characters. i suppose 6 could be significant if you are hitting up against a line length limit. +foo definitely seems to say "foo, plus something else" to me much more than ~foo.