unicode as valid naming symbols

Rustom Mody rustompmody at gmail.com
Tue Apr 1 23:16:27 EDT 2014


On Wednesday, April 2, 2014 8:28:02 AM UTC+5:30, Rustom Mody wrote:
> On Tuesday, April 1, 2014 9:29:27 PM UTC+5:30, Marko Rauhamaa wrote:
> > Chris Angelico :

> > > On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa wrote:
> > >> I implemented the loops in the scheme way. Recursion is how iteration
> > >> is done by the Believers.
> > > Then I'm happily a pagan who uses while loops instead of recursion.
> > > Why should every loop become a named function?

> > Every language has its idioms. The principal aesthetic motivation for
> > named-let loops is the avoidance of (set!), I think. Secondarily, you
> > get to shift gears in the middle of your loops; something you can often,
> > but not always, accomplish in Python with break, return and continue.

> You are forgetting the main point: In scheme, in a named-let, the name
> chosen was very often 'loop' (if I remember the PC scheme manuals
> correctly).  IOW if you had a dozen loops implemented with
> named-letted-tail-recursion, you could call all of them 'loop'.  How
> is that different from calling all of them 'while' or 'for' ?

Umm... I see from your prime number example that there are nested loops
in which sometimes you restart the inner and sometimes the outer.
So you could not possibly call both of them 'loop' :-).

So "you could call all of them 'loop'" is over-statement.
"Good many" may be more appropriate?



More information about the Python-list mailing list