[Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

Steven D'Aprano steve at pearwood.info
Fri Apr 6 19:49:12 EDT 2018


On Fri, Apr 06, 2018 at 03:27:45PM +0000, Cammil Taank wrote:
> I'm not sure if my suggestion for 572 has been considered:
> 
> ``name! expression``
> 
> I'm curious what the pros and cons of this form would be (?).

I can't see any pros for it. In what way is ! associated with assignment 
or binding? It might as well be a arbitrary symbol.

(Yes, I know that ultimately *everything* is an arbitrary symbol, but 
some of them have very strong associations built on years or decades or 
centuries of usage.)

As Peter says, ! is associated with negation, as in !=, and to those of 
us with a maths background, name! simply *screams* "FACTORIAL" at the 
top of its voice.


> My arguments for were in a previous message but there do not seem to be any
> responses to it.

Care to repeat those arguments?


-- 
Steve


More information about the Python-ideas mailing list