(self)
Recalculates the stored modularity value and swallows all exceptions
        raised by the modularity function (if any).

        @return: the new modularity score or C{None} if the modularity function
        could not be calculated.
Recalculates the stored modularity value and swallows all exceptions
        raised by the modularity function (if any).
Recalculates the stored modularity value and swallows all exceptions raised by the modularity function ( if any ) .
def _recalculate_modularity_safe(self):
        """Recalculates the stored modularity value and swallows all exceptions
        raised by the modularity function (if any).

        @return: the new modularity score or C{None} if the modularity function
        could not be calculated.
        """
        try:
            return self.recalculate_modularity()
        except Exception:
            return None
        finally:
            self._modularity_dirty = False
def _recalculate_modularity_safe ( self ) : try : return self . recalculate_modularity ( ) except Exception : return None finally : self . _modularity_dirty = False