Commit 0a096b87 authored by Sebastien Robin's avatar Sebastien Robin

add docstring on asContext

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31802 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b63e6657
...@@ -2784,6 +2784,12 @@ class Base( CopyContainer, ...@@ -2784,6 +2784,12 @@ class Base( CopyContainer,
# Context related methods # Context related methods
security.declarePublic('asContext') security.declarePublic('asContext')
def asContext(self, context=None, REQUEST=None, **kw): def asContext(self, context=None, REQUEST=None, **kw):
"""
Allows to have a kind of temp copy of an object edited with kw
parameters. This is somewhat equivalent to use tempObject.
ex : joe_person = person_module.bob_person.asContext(first_name='Joe')
"""
if context is None: if context is None:
# Make a copy # Make a copy
klass = self.__class__ klass = self.__class__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment