CMS 3D CMS Logo

Public Member Functions | Public Attributes

argparse::ArgumentError Class Reference

Inheritance diagram for argparse::ArgumentError:
Exception Exception

List of all members.

Public Member Functions

def __init__
def __init__
def __str__
def __str__

Public Attributes

 argument_name
 message

Detailed Description

An error from creating or using an argument (optional or positional).

The string value of this exception is the message, augmented with
information about the argument that caused it.

Definition at line 682 of file argparse.py.


Constructor & Destructor Documentation

def argparse::ArgumentError::__init__ (   self,
  argument,
  message 
)

Definition at line 689 of file argparse.py.

00690                                          :
00691         self.argument_name = _get_action_name(argument)
00692         self.message = message

def argparse::ArgumentError::__init__ (   self,
  argument,
  message 
)

Definition at line 707 of file argparse.py.

00707                                          :
00708         self.argument_name = _get_action_name(argument)
00709         self.message = message
00710 

Member Function Documentation

def argparse::ArgumentError::__str__ (   self)

Definition at line 693 of file argparse.py.

00694                      :
00695         if self.argument_name is None:
00696             format = '%(message)s'
00697         else:
00698             format = 'argument %(argument_name)s: %(message)s'
00699         return format % dict(message=self.message,
00700                              argument_name=self.argument_name)
00701 

def argparse::ArgumentError::__str__ (   self)

Definition at line 711 of file argparse.py.

00711                      :
00712         if self.argument_name is None:
00713             format = '%(message)s'
00714         else:
00715             format = 'argument %(argument_name)s: %(message)s'
00716         return format % dict(message=self.message,
00717                              argument_name=self.argument_name)
00718 
00719 # ==============
00720 # Action classes
00721 # ==============
00722 

Member Data Documentation

Definition at line 689 of file argparse.py.

Definition at line 689 of file argparse.py.