> > 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.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6NP5QEF5KQPERDD52X346M6KNNR3GF6V/ Code of Conduct: http://python.org/psf/codeofconduct/