Paul Sokolovsky wrote: > Hello, > On Tue, 5 Jan 2021 20:37:27 +1000 > Nick Coghlan ncogh...@gmail.com wrote: > > object(host=as host, port=as port}:", but that > > couldn't ever be > > I'd like to point out the weirdness of the "as" syntax when applied > to > positional arguments, e.g.: > case [as x, as y]: > case Cls(as x, as y): > That feels unnatural, and the fact behind that intuitive feeling is > that "as" never used like that in Python so far. Where it's used > now, there's explicit "what" is available before "as": > import org_name as alias_name > with expr as var: > So again, standalone "as" feels weird.
It's a matter of taste, I like the compacity of the standalone as. It describe clearly the variable name, and the order matches the positional arguments so I don't find it surprising. If it's not the positional value, what else can it be ? What would be clearer by using an underscore, which itself corresponds to nothing ? The fact that it was never used like this it not an argument per se, because that's the point of new syntax... _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/AM7X2UBI56YHVYFKWWODPJRDRSG5X3G7/ Code of Conduct: http://python.org/psf/codeofconduct/