def _expect_extra(expected, present, exc_unexpected, exc_missing, exc_args):
 if present:
  if (not expected):
   raise exc_unexpected(*exc_args)
 elif (expected and (expected is not Argument.ignore)):
  raise exc_missing(*exc_args)

def _expect_extra ( expected , present , exc_unexpected , exc_missing , exc_args ) : if present : if ( not expected ) : raise exc_unexpected ( * exc_args ) elif ( expected and ( expected is not Argument . ignore ) ) : raise exc_missing ( * exc_args )
checks for the presence of an extra to the argument list .