def parse_args(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args
python类parse_args()的实例源码
def parse_args(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args
def parse_args(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args
def parse_args(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args
def parse_args(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args
def parse_args_ok(self, args=None, options=None):
"""Call optparse.parse_args, but return a triple:
(ok, options, args)
"""
try:
options, args = \
super(CoverageOptionParser, self).parse_args(args, options)
except self.OptionParserError:
return False, None, None
return True, options, args