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/buildd/cherrypy3-3.2.2/cherrypy/tutorial/tut...
|
|
|
__package__ = 'cherrypy.tutorial'
|
tutconf
- Value:
'/build/buildd/cherrypy3-3.2.2/cherrypy/tutorial/tutorial.conf'
|
|