Jean Jordaan wrote:
for brain in Catalog(some_index=some_value):
# delete the object, and then
brain_to_delete = Catalog(unique_index=brain.unique_prop)
Catalog.uncatalog_object(brain_to_delete.getPath())
.. can't really think why that would work if Chris's original
doesn't, though.
..
Jean Jordaan wrote at 2004-3-8 16:33 +0200:
>>> Surely the thing returned by a Catalog search should be immutable?
>>
>> Nope, it is "lazy"; immutability would require "realizing" it first,
>> which would be prohibitively expensive in many cases.
>
>Yes .. thing is, wrapping with list() or tuple
Surely the thing returned by a Catalog search should be immutable?
Nope, it is "lazy"; immutability would require "realizing" it first,
which would be prohibitively expensive in many cases.
Yes .. thing is, wrapping with list() or tuple() will therefore
also be prohibitive in those cases, so can'
Chris Withers wrote:
I have something like this:
for brain in Catalog(some_index=some_value):
# delete the object, and then
Catalog.uncatalog_object(brain.getPath())
...which wasn't deleting all objects where some_index=some_value.
On a hunch, I tried:
for brain in tuple(Catalog(some_in