PEP 255: Simple Generators

Barry A. Warsaw barry at digicool.com
Thu Jun 21 01:44:34 EDT 2001


>>>>> "GE" == Greg Ewing <greg at cosc.canterbury.ac.nz> writes:

    GE> So in the end I decided that combining their functions
    GE> into one statement was a reasonable thing to do after
    GE> all. But I still felt that something was needed to
    GE> distinguish it from an ordinary function definition,
    GE> since it's doing rather *more* than just defining
    GE> a function. So I settled on

    |   generator g(args):
    |     ...

Sounds reasonable to me! :)

-Barry




More information about the Python-list mailing list