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

Rhodri James rhodri at kynesim.co.uk
Mon Apr 9 07:01:16 EDT 2018


On 09/04/18 11:52, Rhodri James wrote:
> On 07/04/18 09:54, Cammil Taank wrote:
>>> Care to repeat those arguments?
>>
>> Indeed.
>>
>> *Minimal use of characters*
> 
> Terseness is not necessarily a virtue.  While it's good not to be 
> needlessly verbose, Python is not Perl and we are not trying to do 
> everything on one line.  Overly terse code is much less readable, as all 
> the obfustication competitions demonstrate.  I'm afraid I count this one 
> *against* your proposal.
> 
>> *Thoughts on odd usage of "!"*
>>
>> In the English language, `!` signifies an exclamation, and I am
>> imagining a similar usage to that of introducing something by its name
>> in an energetic way. For example a boxer walking in to the ring:
>>
>> "Muhammed_Ali! <in walks Muhammed Ali>", "x! get_x()"
> 
> I'm afraid that's a very personal interpretation.  In particular, '!' 
> normally ends a sentence very firmly, so expecting the expression to 
> carry on is a little counter-intuitive.  For me, my expectations of '!' 
> run roughly as:
> 
>    * factorial (from my maths degree)
>    * array dereference (because I am old: a!2 was the equivalent of a[2] 
> in BCPL)
>    * an exclamation, much overused in writing
>    * the author was bitten by Yahoo! at an early age.

Also logical negation in C-like languages, of course.  Sorry, I'm a bit 
sleep-deprived this morning.

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-ideas mailing list