Skip to content

Commit

Permalink
Merge branch 'update_docs_snippets_to_python3_#1019'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiarocci committed May 15, 2017
2 parents a6b0c63 + b17b83a commit ab1c6c0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Patches and Contributions
- Andrés Martano
- Antonio Lourenco
- Arnau Orriols
- Arthur Burkart
- Artem Kolesnikov
- Arthur Burkart
- Ashley Roach
- Ben Demaree
- Bjorn Andersson
Expand Down Expand Up @@ -115,6 +115,7 @@ Patches and Contributions
- Olivier Poitrey
- Ondrej Slinták
- Or Neeman
- Pahaz Blinov
- Patrick Decat
- Pau Freixes
- Paul Doucet
Expand Down
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Version 0.8
Python 2.6.
- Dev: all branches are now tested on travis-ci. Previously, only 'master' was
being tested.
- Docs: code snippets are now Python 3 compatibile (Pahaz Blinov).

Breaking Changes
................
Expand Down
20 changes: 10 additions & 10 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,10 @@ You can subscribe to these events with multiple callback functions.
.. code-block:: pycon
>>> def pre_get_callback(resource, request, lookup):
... print 'A GET request on the "%s" endpoint has just been received!' % resource
... print('A GET request on the "%s" endpoint has just been received!' % resource)
>>> def pre_contacts_get_callback(request, lookup):
... print 'A GET request on the contacts endpoint has just been received!'
... print('A GET request on the contacts endpoint has just been received!')
>>> app = Eve()
Expand Down Expand Up @@ -1159,10 +1159,10 @@ payload.
.. code-block:: pycon
>>> def post_get_callback(resource, request, payload):
... print 'A GET on the "%s" endpoint was just performed!' % resource
... print('A GET on the "%s" endpoint was just performed!' % resource)
>>> def post_contacts_get_callback(request, payload):
... print 'A get on "contacts" was just performed!'
... print('A get on "contacts" was just performed!')
>>> app = Eve()
Expand Down Expand Up @@ -1301,16 +1301,16 @@ the items as needed before they are returned to the client.
.. code-block:: pycon
>>> def before_returning_items(resource_name, response):
... print 'About to return items from "%s" ' % resource_name
... print('About to return items from "%s" ' % resource_name)
>>> def before_returning_contacts(response):
... print 'About to return contacts'
... print('About to return contacts')
>>> def before_returning_item(resource_name, response):
... print 'About to return an item from "%s" ' % resource_name
... print('About to return an item from "%s" ' % resource_name)
>>> def before_returning_contact(response):
... print 'About to return a contact'
... print('About to return a contact')
>>> app = Eve()
>>> app.on_fetched_resource += before_returning_items
Expand Down Expand Up @@ -1360,10 +1360,10 @@ Example:
.. code-block:: pycon
>>> def before_insert(resource_name, items):
... print 'About to store items to "%s" ' % resource
... print('About to store items to "%s" ' % resource)
>>> def after_insert_contacts(items):
... print 'About to store contacts'
... print('About to store contacts')
>>> app = Eve()
>>> app.on_insert += before_insert
Expand Down

0 comments on commit ab1c6c0

Please sign in to comment.