summaryrefslogtreecommitdiffstats
path: root/Lib/pipes.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 15:25:27 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 15:25:27 (GMT)
commit7bc817d5ba917528e8bd07ec461c635291e7b06a (patch)
treed244fa2c8a15248efe095823be9f5e690a2efe38 /Lib/pipes.py
parentaa14837bd00c28997dbde4014f8c994b9482def1 (diff)
downloadcpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.zip
cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.gz
cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.bz2
* Mass change: get rid of all init() methods, in favor of __init__()
constructors. There is no backward compatibility. Not everything has been tested. * aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as comments)
Diffstat (limited to 'Lib/pipes.py')
-rw-r--r--Lib/pipes.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/pipes.py b/Lib/pipes.py
index 426c377..0ae0b8c 100644
--- a/Lib/pipes.py
+++ b/Lib/pipes.py
@@ -29,7 +29,7 @@
# -----------
#
# To create a template:
-# t = Template().init()
+# t = Template()
#
# To add a conversion step to a template:
# t.append(command, kind)
@@ -85,11 +85,10 @@ stepkinds = [FILEIN_FILEOUT, STDIN_FILEOUT, FILEIN_STDOUT, STDIN_STDOUT, \
class Template:
- # Template().init() returns a fresh pipeline template
- def init(self):
+ # Template() returns a fresh pipeline template
+ def __init__(self):
self.debugging = 0
self.reset()
- return self
# t.__repr__() implements `t`
def __repr__(self):
@@ -102,7 +101,7 @@ class Template:
# t.clone() returns a new pipeline template with identical
# initial state as the current one
def clone(self):
- t = Template().init()
+ t = Template()
t.steps = self.steps[:]
t.debugging = self.debugging
return t
@@ -291,7 +290,7 @@ def quote(file):
def test():
import os
print 'Testing...'
- t = Template().init()
+ t = Template()
t.append('togif $IN $OUT', 'ff')
t.append('giftoppm', '--')
t.append('ppmtogif >$OUT', '-f')