Marco Bizzarri schrieb:
Hi all.In many parts of my code I've the following schema of code: def isInUseByOutgoingRegistrations(self, archivefolder): for instance in self.findActiveOutgoingRegistrationInstances(): if instance.forbidToClose(archivefolder): return True return False Before devising my own solution for this kind of problem, I wonder if there is a common solution for the problem. I'm looking for a python2.3 solution.
if any(instance.forbitToClose(archivefolder) for instance in self.findActiveOutgoingRegistrationInstances())
You should also consider using PEP8 style naming. Diez -- http://mail.python.org/mailman/listinfo/python-list
