Chris Withers wrote:
> Oleg Broytmann wrote:
> > Hardlinks are prohibited on directories; and 5 minutes ago you said all
> > objects are foldersih :)
> I'm not sure if my statement applies in this situation... ;-)
> > Hardlinks are prohibited on directories because it'd cause infinite
> > loops on traversing.
> Hmm, would Python catch those already?
> Obviously care would need to be taken and it might be possible to build
> a loop checker into whatever creates the hard links...
This could be part of a "visitor" interface I've been pondering in the
back of my mind. It would be capable of traversing, performing an
arbitrary function, and never falling into a recursive trap.
def visit(self, func, visited=()):
for id in self.objectIds():
ob = self._getOb(id)
if hasattr(ob, 'visit') and ob not in visited:
ob.visit(func, (ob,) + visited)
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -