Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
optparse.OptionError Class Reference
Inheritance diagram for optparse.OptionError:
Inheritance graph
[legend]
Collaboration diagram for optparse.OptionError:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 msg
 option_id

Detailed Description

Raised if an Option instance is created with invalid or
inconsistent arguments.

Definition at line 104 of file optparse.py.


Constructor & Destructor Documentation

def optparse.OptionError.__init__ (   self,
  msg,
  option 
)

Definition at line 110 of file optparse.py.

00110 
00111     def __init__(self, msg, option):
00112         self.msg = msg
00113         self.option_id = str(option)

Here is the caller graph for this function:


Member Function Documentation

Reimplemented from optparse.OptParseError.

Definition at line 114 of file optparse.py.

00114 
00115     def __str__(self):
00116         if self.option_id:
00117             return "option %s: %s" % (self.option_id, self.msg)
00118         else:
00119             return self.msg


Member Data Documentation

Reimplemented from optparse.OptParseError.

Definition at line 111 of file optparse.py.

Definition at line 112 of file optparse.py.


The documentation for this class was generated from the following file: