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 = ' /var/build/temp/tmp.iPfnr5LTs4/4.0-0-0/cherrypy3/ch ...
|
|
__package__ = ' cherrypy.tutorial '
|
tutconf
- Value:
' /var/build/temp/tmp.iPfnr5LTs4/4.0-0-0/cherrypy3/cherrypy3-3.2.2/cher
rypy/tutorial/tutorial.conf '
|
|