On 2021-05-27 21:02, Brendan Barnwell wrote:
On 2021-05-27 12:33, Chris Angelico wrote:
With statics, you could write it like this:

def merge_shortest(things):
     static len=len
     ...

Simple. Easy. Reliable. (And this usage would work with pretty much
any of the defined semantics.) There's no more confusion.

        You can already do that:

def merge_shortest(things):
       len=len
       ...

No, that raises an UnboundLocalError exception.
_______________________________________________
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/CRVOQZMZJFLLCGUHRJ3LXIJIIV4UIYCM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to