Re: what's wrong with "lambda x : print x/60,x%60"
- From: rurpy@xxxxxxxxx
- Date: 5 Dec 2005 21:10:57 -0800
bonono@xxxxxxxxx wrote:
> rurpy@xxxxxxxxx wrote:
> > > and, as you just found out, a rather restrictive one
> > > at that.
> >
> > In part because Python's designers failed to make "print" a function
> > or provide an if-then-else expression.
> >
> Why would one need print in lambda ? I like ternary operator(and there
> is ugly work around though still 100% functional). But print ?
I dashed that last part off quickly, so I don't have a good reason.
Maybe to insert a debugging print temporarily?
.
- Follow-Ups:
- Re: what's wrong with "lambda x : print x/60,x%60"
- From: bonono
- Re: what's wrong with "lambda x : print x/60,x%60"
- References:
- Re: what's wrong with "lambda x : print x/60,x%60"
- From: Gary Herron
- Re: what's wrong with "lambda x : print x/60,x%60"
- From: rurpy
- Re: what's wrong with "lambda x : print x/60,x%60"
- From: bonono
- Re: what's wrong with "lambda x : print x/60,x%60"
- Prev by Date: Re: Xah's Edu Corner: Examples of Quality Technical Writing
- Next by Date: Re: Iterating over test data in unit tests
- Previous by thread: Re: what's wrong with "lambda x : print x/60,x%60"
- Next by thread: Re: what's wrong with "lambda x : print x/60,x%60"
- Index(es):
Relevant Pages
|
Loading