prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Update Hello World example to align with TryPyramid.com
  We've updated the Hello World example on https://trypyramid.com per https://github.com/Pylons/trypyramid.com/pull/205 so we should update it on our official docs.
  
  Verify that line numbers and narrative still align in docs whenever a `literalinclude` of Python files occurs.
  
  - [x] README.rst
  - [x] docs/designdefense.rst
  - [x] docs/index.rst
  - [x] docs/narr/helloworld.py
  - [x] docs/narr/hellotraversal.py (take care to adapt code)
  - [x] docs/narr/configuration.rst ("Declarative Configuration" section only)
  - [x] docs/narr/firstapp.rst
  - [x] docs/narr/hellotraversal.rst
  - [x] docs/quick_tour/hello_world/app.py
  - [x] docs/quick_tour.rst ("Hello World" section only)
  
  Note that I excluded `docs/quick_tutorial/*` because it deliberately starts with imperative configuration, then introduces declarative configuration in [Step 7](http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/views.html).
  
  </issue>
  <code>
  [start of docs/quick_tour/hello_world/app.py]
  1 from wsgiref.simple_server import make_server
  2 from pyramid.config import Configurator
  3 from pyramid.response import Response
  4 
  5 
  6 def hello_world(request):
  7     return Response('<h1>Hello World!</h1>')
  8 
  9 
  10 if __name__ == '__main__':
  11     with Configurator() as config:
  12         config.add_route('hello', '/')
  13         config.add_view(hello_world, route_name='hello')
  14         app = config.make_wsgi_app()
  15     server = make_server('0.0.0.0', 6543, app)
  16     server.serve_forever()
  17
  [end of docs/quick_tour/hello_world/app.py]
  [start of docs/narr/helloworld.py]
  1 from wsgiref.simple_server import make_server
  2 from pyramid.config import Configurator
  3 from pyramid.response import Response
  4 
  5 
  6 def hello_world(request):
  7     return Response('Hello %(name)s!' % request.matchdict)
  8 
  9 if __name__ == '__main__':
  10     with Configurator() as config:
  11         config.add_route('hello', '/hello/{name}')
  12         config.add_view(hello_world, route_name='hello')
  13         app = config.make_wsgi_app()
  14     server = make_server('0.0.0.0', 8080, app)
  15     server.serve_forever()
  16
  [end of docs/narr/helloworld.py]
  [start of docs/narr/hellotraversal.py]
  1 from wsgiref.simple_server import make_server
  2 from pyramid.config import Configurator
  3 from pyramid.response import Response
  4 
  5 class Resource(dict):
  6     pass
  7 
  8 def get_root(request):
  9     return Resource({'a': Resource({'b': Resource({'c': Resource()})})})
  10 
  11 def hello_world_of_resources(context, request):
  12     output = "Here's a resource and its children: %s" % context
  13     return Response(output)
  14 
  15 if __name__ == '__main__':
  16     config = Configurator(root_factory=get_root)
  17     config.add_view(hello_world_of_resources, context=Resource)
  18     app = config.make_wsgi_app()
  19     server = make_server('0.0.0.0', 8080, app)
  20     server.serve_forever()
  21 
  22 
  23
  [end of docs/narr/hellotraversal.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/docs/narr/hellotraversal.py b/docs/narr/hellotraversal.py
  --- a/docs/narr/hellotraversal.py
  +++ b/docs/narr/hellotraversal.py
  @@ -2,21 +2,24 @@
   from pyramid.config import Configurator
   from pyramid.response import Response
   
  +
   class Resource(dict):
       pass
   
  +
   def get_root(request):
       return Resource({'a': Resource({'b': Resource({'c': Resource()})})})
   
  +
   def hello_world_of_resources(context, request):
       output = "Here's a resource and its children: %s" % context
       return Response(output)
   
  +
   if __name__ == '__main__':
  -    config = Configurator(root_factory=get_root)
  -    config.add_view(hello_world_of_resources, context=Resource)
  -    app = config.make_wsgi_app()
  -    server = make_server('0.0.0.0', 8080, app)
  +    with Configurator() as config:
  +        config.set_root_factory(get_root)
  +        config.add_view(hello_world_of_resources, context=Resource)
  +        app = config.make_wsgi_app()
  +    server = make_server('0.0.0.0', 6543, app)
       server.serve_forever()
  -
  -
  diff --git a/docs/narr/helloworld.py b/docs/narr/helloworld.py
  --- a/docs/narr/helloworld.py
  +++ b/docs/narr/helloworld.py
  @@ -4,12 +4,13 @@
   
   
   def hello_world(request):
  -    return Response('Hello %(name)s!' % request.matchdict)
  +    return Response('Hello World!')
  +
   
   if __name__ == '__main__':
       with Configurator() as config:
  -        config.add_route('hello', '/hello/{name}')
  +        config.add_route('hello', '/')
           config.add_view(hello_world, route_name='hello')
           app = config.make_wsgi_app()
  -    server = make_server('0.0.0.0', 8080, app)
  +    server = make_server('0.0.0.0', 6543, app)
       server.serve_forever()
  diff --git a/docs/quick_tour/hello_world/app.py b/docs/quick_tour/hello_world/app.py
  --- a/docs/quick_tour/hello_world/app.py
  +++ b/docs/quick_tour/hello_world/app.py
  @@ -4,7 +4,7 @@
   
   
   def hello_world(request):
  -    return Response('<h1>Hello World!</h1>')
  +    return Response('Hello World!')
   
   
   if __name__ == '__main__':
  
verification_info: {"golden_diff": "diff --git a/docs/narr/hellotraversal.py b/docs/narr/hellotraversal.py\n--- a/docs/narr/hellotraversal.py\n+++ b/docs/narr/hellotraversal.py\n@@ -2,21 +2,24 @@\n from pyramid.config import Configurator\n from pyramid.response import Response\n \n+\n class Resource(dict):\n     pass\n \n+\n def get_root(request):\n     return Resource({'a': Resource({'b': Resource({'c': Resource()})})})\n \n+\n def hello_world_of_resources(context, request):\n     output = \"Here's a resource and its children: %s\" % context\n     return Response(output)\n \n+\n if __name__ == '__main__':\n-    config = Configurator(root_factory=get_root)\n-    config.add_view(hello_world_of_resources, context=Resource)\n-    app = config.make_wsgi_app()\n-    server = make_server('0.0.0.0', 8080, app)\n+    with Configurator() as config:\n+        config.set_root_factory(get_root)\n+        config.add_view(hello_world_of_resources, context=Resource)\n+        app = config.make_wsgi_app()\n+    server = make_server('0.0.0.0', 6543, app)\n     server.serve_forever()\n-\n-\ndiff --git a/docs/narr/helloworld.py b/docs/narr/helloworld.py\n--- a/docs/narr/helloworld.py\n+++ b/docs/narr/helloworld.py\n@@ -4,12 +4,13 @@\n \n \n def hello_world(request):\n-    return Response('Hello %(name)s!' % request.matchdict)\n+    return Response('Hello World!')\n+\n \n if __name__ == '__main__':\n     with Configurator() as config:\n-        config.add_route('hello', '/hello/{name}')\n+        config.add_route('hello', '/')\n         config.add_view(hello_world, route_name='hello')\n         app = config.make_wsgi_app()\n-    server = make_server('0.0.0.0', 8080, app)\n+    server = make_server('0.0.0.0', 6543, app)\n     server.serve_forever()\ndiff --git a/docs/quick_tour/hello_world/app.py b/docs/quick_tour/hello_world/app.py\n--- a/docs/quick_tour/hello_world/app.py\n+++ b/docs/quick_tour/hello_world/app.py\n@@ -4,7 +4,7 @@\n \n \n def hello_world(request):\n-    return Response('<h1>Hello World!</h1>')\n+    return Response('Hello World!')\n \n \n if __name__ == '__main__':\n", "issue": "Update Hello World example to align with TryPyramid.com\nWe've updated the Hello World example on https://trypyramid.com per https://github.com/Pylons/trypyramid.com/pull/205 so we should update it on our official docs.\r\n\r\nVerify that line numbers and narrative still align in docs whenever a `literalinclude` of Python files occurs.\r\n\r\n- [x] README.rst\r\n- [x] docs/designdefense.rst\r\n- [x] docs/index.rst\r\n- [x] docs/narr/helloworld.py\r\n- [x] docs/narr/hellotraversal.py (take care to adapt code)\r\n- [x] docs/narr/configuration.rst (\"Declarative Configuration\" section only)\r\n- [x] docs/narr/firstapp.rst\r\n- [x] docs/narr/hellotraversal.rst\r\n- [x] docs/quick_tour/hello_world/app.py\r\n- [x] docs/quick_tour.rst (\"Hello World\" section only)\r\n\r\nNote that I excluded `docs/quick_tutorial/*` because it deliberately starts with imperative configuration, then introduces declarative configuration in [Step 7](http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/views.html).\n", "before_files": [{"content": "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\n\ndef hello_world(request):\n    return Response('<h1>Hello World!</h1>')\n\n\nif __name__ == '__main__':\n    with Configurator() as config:\n        config.add_route('hello', '/')\n        config.add_view(hello_world, route_name='hello')\n        app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 6543, app)\n    server.serve_forever()\n", "path": "docs/quick_tour/hello_world/app.py"}, {"content": "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\n\ndef hello_world(request):\n    return Response('Hello %(name)s!' % request.matchdict)\n\nif __name__ == '__main__':\n    with Configurator() as config:\n        config.add_route('hello', '/hello/{name}')\n        config.add_view(hello_world, route_name='hello')\n        app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 8080, app)\n    server.serve_forever()\n", "path": "docs/narr/helloworld.py"}, {"content": "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\nclass Resource(dict):\n    pass\n\ndef get_root(request):\n    return Resource({'a': Resource({'b': Resource({'c': Resource()})})})\n\ndef hello_world_of_resources(context, request):\n    output = \"Here's a resource and its children: %s\" % context\n    return Response(output)\n\nif __name__ == '__main__':\n    config = Configurator(root_factory=get_root)\n    config.add_view(hello_world_of_resources, context=Resource)\n    app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 8080, app)\n    server.serve_forever()\n\n\n", "path": "docs/narr/hellotraversal.py"}]}