unicode as valid naming symbols

Terry Reedy tjreedy at udel.edu
Tue Mar 25 22:26:57 EDT 2014


On 3/25/2014 2:30 PM, Mark H Harris wrote:
> greetings, I would like to create a lamda as follows:

A lambda is a function lacking a proper name.

> √ = lambda n: sqrt(n)

This is discouraged in PEP8. If the following worked,

def √(n): return sqrt(n)

would have √ as its __name__ attribute

-- 
Terry Jan Reedy





More information about the Python-list mailing list