PEP 308: "then" "else" for deprecating "and" "or" side effects

Tim Peters tim.one at comcast.net
Wed Feb 26 01:03:33 EST 2003


[Michael Hudson]
> Basically what got augmented assignment into the core was a couple of
> people getting tired of the gassing about it and writing some code
> (it's possible this tactic is a bit too effective).

It's getting less so over time, starting with bytecodehacks <wink>.

[Neil Schemenauer]
> Ditto for generators.  In retrospect, I don't find them as useful
> as I thought they would be.  I guess some people like them.

When they're the right solution, nothing else satisfies.  If you haven't
looked lately, the spam filter you're using contains about 100 yield
statements (the tokenizer is one massive distributed generator, although
more-essential use of generators was made in the statistical testing
framework, to chew over tens of thousands of msgs in a memory-efficient
way).  I've found bread-and-butter uses like that so natural that I had to
think about whether I've ever used generators at all(!).






More information about the Python-list mailing list