(name, function, extra_args=None, description='')
Registers an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
Registers an archive format.
Registers an archive format .
def register_archive_format(name, function, extra_args=None, description=''):
    """Registers an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    """
    if extra_args is None:
        extra_args = []
    if not callable(function):
        raise TypeError('The %s object is not callable' % function)
    if not isinstance(extra_args, (tuple, list)):
        raise TypeError('extra_args needs to be a sequence')
    for element in extra_args:
        if not isinstance(element, (tuple, list)) or len(element) !=2 :
            raise TypeError('extra_args elements are : (arg_name, value)')

    _ARCHIVE_FORMATS[name] = (function, extra_args, description)
def register_archive_format ( name , function , extra_args = None , description = '' ) : if extra_args is None : extra_args = [ ] if not callable ( function ) : raise TypeError ( 'The %s object is not callable' % function ) if not isinstance ( extra_args , ( tuple , list ) ) : raise TypeError ( 'extra_args needs to be a sequence' ) for element in extra_args : if not isinstance ( element , ( tuple , list ) ) or len ( element ) != 2 : raise TypeError ( 'extra_args elements are : (arg_name, value)' ) _ARCHIVE_FORMATS [ name ] = ( function , extra_args , description )