mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
* change default line numbers for 'list' in pdb.py
* changed eval() into getattr() in cmd.py * added dirname(), basename() and (dummy) normath() to macpath.py * renamed nntp.py to nntplib.py * Made string.index() compatible with strop.index() * Make string.atoi('') raise string.atoi_error rather than ValueError * Added dirname() and normpath() to posixpath.
This commit is contained in:
parent
1115ab2a74
commit
c629d34c4f
7 changed files with 442 additions and 10 deletions
|
@ -37,7 +37,7 @@ class Cmd:
|
|||
return self.default(line)
|
||||
else:
|
||||
try:
|
||||
func = eval('self.do_' + cmd)
|
||||
func = getattr(self, 'do_' + cmd)
|
||||
except AttributeError:
|
||||
return self.default(line)
|
||||
return func(arg)
|
||||
|
@ -49,7 +49,7 @@ class Cmd:
|
|||
if arg:
|
||||
# XXX check arg syntax
|
||||
try:
|
||||
func = eval('self.help_' + arg)
|
||||
func = getattr(self, 'help_' + arg)
|
||||
except:
|
||||
print '*** No help on', `arg`
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue