def _reverse(viewname, args=None, kwargs=None, request=None, format=None, **extra):
 if (format is not None):
  kwargs = (kwargs or {})
  kwargs['format'] = format
 return reverse(viewname, args=args, kwargs=kwargs, **extra)

def _reverse ( viewname , args = None , kwargs = None , request = None , format = None , ** extra ) : if ( format is not None ) : kwargs = ( kwargs or { } ) kwargs [ 'format' ] = format return reverse ( viewname , args = args , kwargs = kwargs , ** extra )
same as django .