from __future__ import generators

Andrew Dalke dalke at acm.org
Fri Aug 10 15:38:37 CEST 2001


Joal Heagney wrote:
>Well as a quick test, I went through my entire python1.5 install
>(because it's the oldest python code I've got lying around :) grepping
>for "yield" and only found the following references.

As another quick test, I went to google and searched for
  import yield def

and found (about hit 18)

http://www.cosc.canterbury.ac.nz/~greg/python/Plex/1.1.1/doc/Tutorial.html


]  def indent_to(self, new_level):
]   self.indentation_stack.append(new_level)
]   self.yield('INDENT', '')

[...]

] Calling the yield() method of the Scanner object has the same effect
] as returning a value from the action procedure.

The only other examples I saw in the first 200 hits were
a use of yield for Stackless, and that Java's Thread uses a 'yield'
method, which would be a concern for Jython.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list