My (late) beef with Simple Generator syntax (PEP 255)
David Eppstein
eppstein at ics.uci.edu
Wed Nov 13 17:16:36 EST 2002
More information about the Python-list mailing list
Wed Nov 13 17:16:36 EST 2002
- Previous message (by thread): My (late) beef with Simple Generator syntax (PEP 255)
- Next message (by thread): My (late) beef with Simple Generator syntax (PEP 255)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/13/02 2:11 PM -0800 Cameron Horn <camhorn at mac.com> wrote: >> What I wonder is, why does it need to be a generator? What's wrong with >> def foo(): return ( ) >> ? > > You're right if it's a one-time thing. However, if I've got a > scaffolding like this, then it matters. > > def process_generator(function): > for x in function(): > print x How does the function foo() I defined above fail to work in this scaffolding? -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
- Previous message (by thread): My (late) beef with Simple Generator syntax (PEP 255)
- Next message (by thread): My (late) beef with Simple Generator syntax (PEP 255)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list