A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-list/1999-September/018552.html below:

List Comprehensions Enhancement

List Comprehensions Enhancementskaller skaller at maxtal.com.au
Tue Sep 21 12:27:17 EDT 1999
Hannah Schroeter wrote:

> Hello!
>
> In article <37DDA62D.84BE5083 at compaq.com>,
> Greg Ewing  <greg.ewing at compaq.com> wrote:
> >[...]
>
> >Hey, wow! And I haven't even gotten onto case statements
> >with pattern matching yet...
>
> *laugh*
>
> And soon there'll be function clauses with patterns and (pattern?)
> guards. *g*
>
> And then, Python will be assimilated by the (impure strict) functional
> world: A Scheme with gentler syntax and OO and module systems. :-)
>
> Regards, Hannah.
>
> PS: Mind the smileys!

Hmm. Something like this is planned for Viper.
No smileys.

You should note that current Python doesn't support closures,
that is, nested functions are not bound to the enclosing context.

Viper functions are.

In case you didn't know -- and hey, I didn't either until recently --
Python ALREADY has pattern matching, its just that the patterns
are simple: the only patterns recognized are

    variable-name
    tuple of pattern

For example:

    def f((x,y,z)): print x,y,z
    f((1,2,3))





More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4