"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
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