Checking the boolean value of a collection

Marco Bizzarri marco.bizzarri at
Fri Sep 12 15:50:40 CEST 2008

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.


Marco Bizzarri

More information about the Python-list mailing list