(self, name)
return self.__getitem__(name)
Get a database by name.

        Raises :class:`~pymongo.errors.InvalidName` if an invalid
        database name is used.

        :Parameters:
          - `name`: the name of the database to get
Get a database by name.
Get a database by name .
def __getattr__(self, name):
        """Get a database by name.

        Raises :class:`~pymongo.errors.InvalidName` if an invalid
        database name is used.

        :Parameters:
          - `name`: the name of the database to get
        """
        if name.startswith('_'):
            raise AttributeError(
                "MongoClient has no attribute %r. To access the %s"
                " database, use client[%r]." % (name, name, name))
        return self.__getitem__(name)
def __getattr__ ( self , name ) : if name . startswith ( '_' ) : raise AttributeError ( "MongoClient has no attribute %r. To access the %s" " database, use client[%r]." % ( name , name , name ) ) return self . __getitem__ ( name )