Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Commit

Permalink
Removal of tuple parameter unpacking in method definition (Fixes #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Apr 16, 2018
1 parent 4a9d526 commit 664c85d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -6,6 +6,9 @@ Changelog

Bug fixes:

- Removal of tuple parameter unpacking in method definition (Fixes #14)
[ale-rt]

- Provide an up-to-date bootstrap.py
- Python 3 compatibility: use the adapter and implementer decorators
[ale-rt]
Expand Down
3 changes: 2 additions & 1 deletion src/plone/z3cform/crud/README.txt
Expand Up @@ -51,7 +51,8 @@ Our simple form looks like this:
... storage[str(person.name)] = person
... return person
...
... def remove(self, (id, item)):
... def remove(self, id_item):
... id, item = id_item
... del storage[id]

This is all that we need to render a combined edit add form containing
Expand Down
6 changes: 3 additions & 3 deletions src/plone/z3cform/crud/crud.py
Expand Up @@ -54,7 +54,7 @@ def add(data):
a problem with the add form data.
"""

def remove((id, item)):
def remove(id_item):
"""Subclasses must implement this method to remove the given
item from the site.
Expand Down Expand Up @@ -95,8 +95,8 @@ def get_items(self):
def add(self, data):
raise NotImplementedError

def remove(self, xxx_todo_changeme1):
(id, item) = xxx_todo_changeme1
def remove(self, id_item):
(id, item) = id_item
raise NotImplementedError

def before_update(self, item, data):
Expand Down

0 comments on commit 664c85d

Please sign in to comment.