Skip to content

Commit

Permalink
Remove use of apply(); apply() generates a PendingDeprecationWarning …
Browse files Browse the repository at this point in the history
…when

used with Python 2.3.
  • Loading branch information
freddrake committed Feb 27, 2003
1 parent 990f3c8 commit 7c306e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DT_Let.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ def parse_let_params(text,
result.append((name,value))

text=text[l:].strip()
if text: return apply(parse_let_params,(text,result,tag),parms)
if text: return parse_let_params(text,result,tag,**parms)
else: return result
12 changes: 6 additions & 6 deletions DT_Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
'''$Id: DT_Util.py,v 1.88 2002/08/14 22:29:52 mj Exp $'''
__version__='$Revision: 1.88 $'[11:-2]
'''$Id: DT_Util.py,v 1.89 2003/02/27 17:31:27 fdrake Exp $'''
__version__='$Revision: 1.89 $'[11:-2]

import re, os
from html_quote import html_quote, ustr # for import by other modules, dont remove!
Expand Down Expand Up @@ -150,7 +150,7 @@ def namespace(self, **kw):
incorrect "self" argument. It could be caused by a product which
is not yet compatible with this version of Zope. The traceback
information may contain more details.)'''
return apply(self, (), kw)
return self(**kw)

d['namespace']=namespace

Expand Down Expand Up @@ -399,14 +399,14 @@ def parse_params(text,
'Invalid attribute name, "%s"' % name, tag)
else:
result['']=name
return apply(parse_params,(text[l:],result),parms)
return parse_params(text[l:],result,**parms)
elif mo_unq:
name=mo_unq.group(2)
l=len(mo_unq.group(1))
if result: raise ParseError, (
'Invalid attribute name, "%s"' % name, tag)
else: result['']=name
return apply(parse_params,(text[l:],result),parms)
return parse_params(text[l:],result,**parms)
else:
if not text or not text.strip(): return result
raise ParseError, ('invalid parameter: "%s"' % text, tag)
Expand All @@ -424,5 +424,5 @@ def parse_params(text,
result[name]=value

text=text[l:].strip()
if text: return apply(parse_params,(text,result),parms)
if text: return parse_params(text,result,**parms)
else: return result

0 comments on commit 7c306e3

Please sign in to comment.