diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/pipes.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/pipes.py')
-rw-r--r-- | Lib/pipes.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/pipes.py b/Lib/pipes.py index 9de22e1..295d9c8 100644 --- a/Lib/pipes.py +++ b/Lib/pipes.py @@ -89,8 +89,8 @@ class Template: self.reset() def __repr__(self): - """t.__repr__() implements `t`.""" - return '<Template instance, steps=' + `self.steps` + '>' + """t.__repr__() implements repr(t).""" + return '<Template instance, steps=%r>' % (self.steps,) def reset(self): """t.reset() restores a pipeline template to its initial state.""" @@ -115,7 +115,7 @@ class Template: 'Template.append: cmd must be a string' if kind not in stepkinds: raise ValueError, \ - 'Template.append: bad kind ' + `kind` + 'Template.append: bad kind %r' % (kind,) if kind == SOURCE: raise ValueError, \ 'Template.append: SOURCE can only be prepended' @@ -137,7 +137,7 @@ class Template: 'Template.prepend: cmd must be a string' if kind not in stepkinds: raise ValueError, \ - 'Template.prepend: bad kind ' + `kind` + 'Template.prepend: bad kind %r' % (kind,) if kind == SINK: raise ValueError, \ 'Template.prepend: SINK can only be appended' @@ -160,7 +160,7 @@ class Template: if rw == 'w': return self.open_w(file) raise ValueError, \ - 'Template.open: rw must be \'r\' or \'w\', not ' + `rw` + 'Template.open: rw must be \'r\' or \'w\', not %r' % (rw,) def open_r(self, file): """t.open_r(file) and t.open_w(file) implement |