[Zope3-dev] Re: CVS: Zope3/src/zope/app/interfaces/container - __init__.py:1.9

Sidnei da Silva sidnei@x3ng.com
Mon, 31 Mar 2003 10:16:14 -0300


On Mon, Mar 31, 2003 at 01:27:21PM +0200, Steve Alexander wrote:
| Hi Sidnei!
| 
| 
|   http://mail.zope.org/pipermail/zope3-checkins/2003-March/007748.html
| 
| ----
| Slight changes to IObjectCopier to allow copying without children. Its 
| somewhat crufty, but I cant think of a better solution. Comes with tests :)
| 
| === Zope3/src/zope/app/interfaces/container/__init__.py 1.8 => 1.9 ===
| --- Zope3/src/zope/app/interfaces/container/__init__.py:1.8	Wed Feb 26 
| 11:11:36 2003
| +++ Zope3/src/zope/app/interfaces/container/__init__.py	Sun Mar 30 
| 10:41:00 2003
| @@ -273,11 +273,14 @@
| 
|  class ICopySource(Interface):
| 
| -    def copyObject(key, copyingTo):
| +    def copyObject(key, copyingTo, with_children=True):
| ----
| 
| As we discussed on IRC, the 'with_children' thing is used only by DAV, 
| and only with Folders.
| 
| I suggest leaving ICopySource as it was, and instead making an interface 
| that extends it:
| 
|  class INoChildrenCopySource(ICopySource):
| 
|      def copyObjectNoChildren(key, copyingTo):
|          ....
| 
| This avoids adding unneeded complexity to ICopySource.

Nice suggestion indeed. Ill take some time this evening to make it
like this.

[]'s
-- 
Sidnei da Silva (dreamcatcher) <sidnei@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>
GNU/Linux user 257852
Debian GNU/Linux 3.0 (Sid) 2.4.18 ppc

<miguel> any new sendmail hole I have to fix before going on vacations?
	-- Seen on #Linux