* More changes due to stricter argument passing rules

* Fixed calendar.py, mimetools.py, whrandom.py to cope with time.time()
  returning a floating point number.  (And fix old bug in calendar)
* Add recursion level to mainloop.mainloop(), to make it reentrant.
This commit is contained in:
Guido van Rossum 1993-01-04 09:16:51 +00:00
parent a2b7f40513
commit fea2af1e9b
18 changed files with 113 additions and 78 deletions

View file

@ -11,11 +11,13 @@ class Prog:
finally:
xxx = regex.set_syntax(save_syntax)
return self
def match(self, args):
if type(args) == type(()):
def match(self, *args):
if len(args) == 2:
str, offset = args
elif len(args) == 1:
str, offset = args[0], 0
else:
str, offset = args, 0
raise TypeError, 'wrong argument count'
if self.prog.search(str, offset) < 0:
return ()
regs = self.prog.regs