On 15/06/20 3:36 am, Paul Moore wrote:
def foo() -> {1, 2, 3}: return 2That is, of course, valid syntax right now. I wonder what a type checker could do with it?
Even if it understood your intent, it probably couldn't do much, because enforcing that constraint would require a run-time check. -- Greg _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5NQBLPGDD5S4W5NV7LOOCY4ZRQICUOVH/ Code of Conduct: http://python.org/psf/codeofconduct/
