def formatters(self):
        """
        Build a dictionary containing all those key/value pairs that will be exposed to the user via formatters.
        """
        event_dict = dict(
            title=self.title,
            remaining=self.time_remaining,
            humanize_remaining=self.humanize_time_remaining,
        )

        def is_formatter(x):
            return inspect.ismethod(x) and hasattr(x, 'formatter') and getattr(x, 'formatter')

        for method_name, method in inspect.getmembers(self, is_formatter):
            event_dict[method_name] = method()
        return event_dict
def formatters ( self ) : event_dict = dict ( title = self . title , remaining = self . time_remaining , humanize_remaining = self . humanize_time_remaining , ) def is_formatter ( x ) : return inspect . ismethod ( x ) and hasattr ( x , 'formatter' ) and getattr ( x , 'formatter' ) for method_name , method in inspect . getmembers ( self , is_formatter ) : event_dict [ method_name ] = method ( ) return event_dict
Build a dictionary containing all those key/value pairs that will be exposed to the user via formatters.