[Python-ideas] Another way to avoid clumsy lambdas, while adding new functionality
Cameron Simpson
cs at zip.com.au
Wed Mar 5 06:15:34 CET 2014
On 05Mar2014 04:06, MRAB <python at mrabarnett.plus.com> wrote:
> On 2014-03-05 01:46, Cameron Simpson wrote:
> >> a = $(foo + 1)
> >
> >Definitely nicer. Still irrationally uncomfortable about the "$" though.
> >A thought, though it could break existing code (and nested tuples, alas):
> > a = (( foo + 1 ))
> >
> That's not a tuple. It's equivalent to:
> a = foo + 1
I know that. I should have said: though the below looks nice, in more complicated forms it fights with tuples, eg:
((1,2,3),(4,5,6))
(((1,2,3),(4,5,6)))
:-(
--
Cameron Simpson <cs at zip.com.au>
Theoretical Physicist,N.:A physicist whose existence is postulated, to make
the numbers balance but who is never actually observed in the laboratory.
More information about the Python-ideas
mailing list