Uniform Function Call Syntax (UFCS)

jongiddy jongiddy at gmail.com
Sun Jun 8 12:34:59 EDT 2014


On Sunday, 8 June 2014 17:24:56 UTC+1, jongiddy  wrote:

> # would work with UFCS
> f.readlines().map(int).min(key=lambda n: n % 10).str().b64encode(b'?-').print()

Ooops - map is the wrong way round to support UFCS in this case.  However, with UFCS, I could fix this by changing it to smap, and defining:

def smap(seq, func):
   return map(func, seq)



More information about the Python-list mailing list