def __getitem__(self, collectionName) :
        """use database[collectionName] to get a collection from the database"""
        try :
            return self.collections[collectionName]
        except KeyError :
            self.reload()
            try :
                return self.collections[collectionName]
            except KeyError :
                raise KeyError("Can't find any collection named : %s" % collectionName)
def __getitem__ ( self , collectionName ) : try : return self . collections [ collectionName ] except KeyError : self . reload ( ) try : return self . collections [ collectionName ] except KeyError : raise KeyError ( "Can't find any collection named : %s" % collectionName )
use database[collectionName] to get a collection from the database