On Thu, Nov 12, 2020 at 8:41 PM David Mertz <me...@gnosis.cx> wrote: > One idea that I cannot recall seeing, but that seems to make sense to me and > fit with Python's feel is using a WORD to distinguish between a variable > value and a binding target. That is, instead of a special symbol prefixing > or suffixing a name, either to indicate it is or is not a binding target. Of > course, whether the extra word would be used for binding or for NOT binding > is a question still.
I agree 100%. Words instead of sigils is more like the rest of Python. Best, Luciano > > NOT_FOUND = 404 > match http_code: > case 200: > print("OK document") > case value NOT_FOUND: # use the variable value > print("Document not found") > case OTHER_CODE: # bind this name > print("Other HTTP code", OTHER_CODE) > > Of course, this would require a soft keyword, which is a disadvantage. Going > the other direction: > > NOT_FOUND = 404 > match http_code: > case 200: > print("OK document") > case NOT_FOUND: # use the variable value > print("Document not found") > case bind OTHER_CODE: # bind this name > print("Other HTTP code") > > To me these read better than the punctuation characters. But I guess some > folks have suggested enlisting 'as', which is a word, of course. > > > > > -- > Keeping medicines from the bloodstreams of the sick; food > from the bellies of the hungry; books from the hands of the > uneducated; technology from the underdeveloped; and putting > advocates of freedom in prisons. Intellectual property is > to the 21st century what the slave trade was to the 16th. > _______________________________________________ > 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/5YUWE7K6LX3VZIISURABRBCEIGMYDUCS/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg _______________________________________________ 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/SNOU3YVKLQDA4SUBWX5L22XEGSKZBIVX/ Code of Conduct: http://python.org/psf/codeofconduct/