[Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Wichert Akkerman
I noticed something odd in repoze.folder: __setitem__ does not allow you to replace an existing item. This is a result from __setitem__ being an alias for add(). Is that a deliberate design decision? If not I'ld like to change it to allow replacing items. Wichert.

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Wichert Akkerman
On 6/17/10 14:53 , Chris McDonough wrote: On Thu, 2010-06-17 at 11:28 +0200, Wichert Akkerman wrote: I noticed something odd in repoze.folder: __setitem__ does not allow you to replace an existing item. This is a result from __setitem__ being an alias for add(). Is that a deliberate design

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Chris McDonough
On Thu, 2010-06-17 at 14:57 +0200, Wichert Akkerman wrote: On 6/17/10 14:53 , Chris McDonough wrote: On Thu, 2010-06-17 at 11:28 +0200, Wichert Akkerman wrote: I noticed something odd in repoze.folder: __setitem__ does not allow you to replace an existing item. This is a result from

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Charlie Clark
Am 17.06.2010, 11:28 Uhr, schrieb Wichert Akkerman wich...@wiggy.net: I noticed something odd in repoze.folder: __setitem__ does not allow you to replace an existing item. This is a result from __setitem__ being an alias for add(). Is that a deliberate design decision? If not I'ld like to

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Malthe Borch
On 17 June 2010 16:08, Charlie Clark charlie.cl...@clark-consulting.eu wrote: This is standard behaviour for folders (the not accepting duplicates). I think changing it would be against user expectations. My file system accepts duplicates (meaning replacement). I don't need to remove the file

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Charlie Clark
Am 17.06.2010, 16:08 Uhr, schrieb Tim Hoffman zutes...@gmail.com: I would be concerned if you tried to __setitem__ a new page to replace the existing folder of the same name thus blowing away a whole heap of subfolders and documents in the process. Agreed but mv will let you do this but

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Chris Rossi
On Thu, Jun 17, 2010 at 10:08 AM, Tim Hoffman zutes...@gmail.com wrote: I would be concerned if you tried to __setitem__ a new page to replace the existing folder of the same name thus blowing away a whole heap of subfolders and documents in the process. Very bad ;-( I would tend to think

Re: [Repoze-dev] repoze.folder API weirdness

2010-06-17 Thread Tim Hoffman
For what its worth I would follow the current zope object manager semantics. Rgds T On Thu, Jun 17, 2010 at 10:41 PM, Chris Rossi ch...@archimedeanco.comwrote: On Thu, Jun 17, 2010 at 10:08 AM, Tim Hoffman zutes...@gmail.com wrote: I would be concerned if you tried to __setitem__ a new