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 = '/home/kov/build-area/cherrypy3-3.5.0/cherrypy/tutor...
|
|
|
__package__ = 'cherrypy.tutorial'
|
tutconf
- Value:
'/home/kov/build-area/cherrypy3-3.5.0/cherrypy/tutorial/tutorial.conf'
|
|