mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
string.maketrans() now produces translation tables for bytes.translate() -- wrong module?
Fix all remaining instances that did bad things with the new str.translate().
This commit is contained in:
parent
226878cba5
commit
7f13e6b3e2
9 changed files with 39 additions and 62 deletions
|
@ -348,11 +348,10 @@ class install (Command):
|
|||
if opt_name[-1] == "=":
|
||||
opt_name = opt_name[0:-1]
|
||||
if self.negative_opt.has_key(opt_name):
|
||||
opt_name = self.negative_opt[opt_name].translate(
|
||||
longopt_xlate)
|
||||
opt_name = longopt_xlate(self.negative_opt[opt_name])
|
||||
val = not getattr(self, opt_name)
|
||||
else:
|
||||
opt_name = opt_name.translate(longopt_xlate)
|
||||
opt_name = longopt_xlate(opt_name)
|
||||
val = getattr(self, opt_name)
|
||||
print(" %s: %s" % (opt_name, val))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue