Checking the boolean value of a collection

Marco Bizzarri marco.bizzarri at gmail.com
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.

Regards
Marco

-- 
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/



More information about the Python-list mailing list