Wild idea: Instead of sentinels, have a way of declaring optional arguments with no default, and a way of conditionally assigning a value to them if they are not bound.
E.g. def order(eggs = 4, spam =): spam ?= Spam() Here the '?=' means "if spam is not bound, then evaluate the rhs and assign it, otherwise do nothing." -- Greg _______________________________________________ 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/4C2WQRFTLBXXQ32IJTWJA4QQKYKBISRC/ Code of Conduct: http://python.org/psf/codeofconduct/