From 7bc817d5ba917528e8bd07ec461c635291e7b06a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 17 Dec 1993 15:25:27 +0000 Subject: * 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) --- Lib/regexp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Lib/regexp.py') diff --git a/Lib/regexp.py b/Lib/regexp.py index 755f65ad7f..613681488b 100644 --- a/Lib/regexp.py +++ b/Lib/regexp.py @@ -4,13 +4,12 @@ import regex from regex_syntax import * class Prog: - def init(self, pat): + def __init__(self, pat): save_syntax = regex.set_syntax(RE_SYNTAX_AWK) try: self.prog = regex.compile(pat) finally: xxx = regex.set_syntax(save_syntax) - return self def match(self, *args): if len(args) == 2: str, offset = args @@ -27,7 +26,7 @@ class Prog: return regs[:i] def compile(pat): - return Prog().init(pat) + return Prog(pat) cache_pat = None cache_prog = None -- cgit v1.2.1