[Python-ideas] Anonymous blocks (again):
Jonathan Eunice
jonathan.eunice at gmail.com
Mon May 13 22:19:52 CEST 2013
That many Python functions don't produce useful values makes
it difficult or impossible to do "chained" or "fluent" operations a la
JavaScript or Perl.
I love that Python avoids "expression soup" and long run-on
invocations, but the lack of appreciable support for "fluency" or even
a smidgeon of functional style seems to regularly "verticalize"
Python code, with several lines required do common things, such as
fully construct / initialize / setup an object.
Apologize if this seems tangential. To me it seems related to some
of the examples in this thread where Python pushes configuration
statements/calls oddly after the related code block.
On Monday, May 13, 2013 3:10:14 PM UTC-4, Bruce Leban wrote:
>
>
> Not all functions produce a useful value.
>
> [].append(1)
> [].sort()
> print(1)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130513/3590e21b/attachment.html>
More information about the Python-ideas
mailing list