[Python-ideas] Possible PEP 380 tweak (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 30 08:16:44 CEST 2010
- Previous message: [Python-ideas] Possible PEP 380 tweak
- Next message: [Python-ideas] Possible PEP 380 tweak
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
On Fri, Oct 29, 2010 at 8:09 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
and even then you would lose the return value from the inner generator, which you're probably going to want. Really? Can you show a realistic use case?
Here's an attempt:
def variancer(): # Compute variance of values sent in (details left # as an exercise)
def stddever(): # Compute standard deviation of values sent in v = yield from variancer() return sqrt(v)
-- Greg
- Previous message: [Python-ideas] Possible PEP 380 tweak
- Next message: [Python-ideas] Possible PEP 380 tweak
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]