Module tut08_generators_and_yield
source code
Bonus Tutorial: Using generators to return result bodies
Instead of returning a complete result string, you can use the yield
statement to return one result part after another. This may be convenient
in situations where using a template package like CherryPy or Cheetah
would be overkill, and messy string concatenation too uncool. ;-)
|
tutconf = ' /build/cherrypy3-a3bxFB/cherrypy3-3.5.0/cherrypy/tu ...
|
|
__package__ = ' cherrypy.tutorial '
|
tutconf
- Value:
' /build/cherrypy3-a3bxFB/cherrypy3-3.5.0/cherrypy/tutorial/tutorial.co
nf '
|
|