Skip to content

Commit

Permalink
Fix mistake in print statement conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed May 13, 2017
1 parent 5671856 commit c7dd95f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/OFS/tests/event.txt
Expand Up @@ -59,17 +59,15 @@ printed events will be in their "natural" order::
>>> from OFS.interfaces import IObjectClonedEvent
>>> from OFS.interfaces import IObjectWillBeMovedEvent
>>> def printObjectEvent(object, event):
... print(event.__class__.__name__)
... print(object.getId())
... print(event.__class__.__name__ + ' ' + object.getId())
>>> def printObjectEventExceptSome(object, event):
... if (IObjectMovedEvent.providedBy(event) or
... IObjectCopiedEvent.providedBy(event) or
... IObjectWillBeMovedEvent.providedBy(event) or
... IObjectClonedEvent.providedBy(event) or
... IRegistrationEvent.providedBy(event)):
... return
... print(event.__class__.__name__)
... print(object.getId())
... print(event.__class__.__name__ + ' ' + object.getId())

>>> from zope.component import provideHandler
>>> provideHandler(printObjectEvent, (IItem, IObjectMovedEvent))
Expand Down

0 comments on commit c7dd95f

Please sign in to comment.