A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/074067.html below:

Named code blockes

Named code blockesSteve Holden sholden at holdenweb.com
Tue Apr 24 14:45:09 EDT 2001
"Rainer Deyke" <root at rainerdeyke.com> wrote in ...
> "Alex Martelli" <aleaxit at yahoo.com> wrote ...
> > "Rainer Deyke" <root at rainerdeyke.com> wrote ...
> > > In Python, unnamed objects have an additional benefit: there is a
single
> > > consistent way of naming them.  Consider:
> > >
> > > a = 5
> > > b = lambda: None
> > > def c():
> > >   pass
> > >
> > > These are three assignments, but only two look like assingments.  The
> >
> > They are three ways to bind (or re-bind) names, but only two of them
> > ARE "assignments" -- Python's syntax defines assignments, plain and
> > augmented, rather precisely, and there is no 'def' keyword there:-).
>
> I count four ways ('import', 'def', '=', and augmented assignment), not
> counting 'globals().set' and similar tricks.
>
Then there's class. I count five ways ...

nobody-expects-the-spanish-inquisition-ly y'rs  - steve



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