summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Richter <stephan.richter@gmail.com>2004-07-15 21:22:32 +0000
committerStephan Richter <stephan.richter@gmail.com>2004-07-15 21:22:32 +0000
commit8a9d65d474a11272cd3caf5bb04969fb1144bdc9 (patch)
tree82ff0ad8340fadc862f8cf4544611419c2f8bbbe
parent1e22536fa24e9f6bc379dca722afdea28f16aeb3 (diff)
downloadzope-tal-8a9d65d474a11272cd3caf5bb04969fb1144bdc9.tar.gz
Converted as many classes as possible to new style classes.
-rw-r--r--dummyengine.py6
-rw-r--r--ndiff.py2
-rw-r--r--taldefs.py2
-rw-r--r--talgenerator.py2
-rw-r--r--talgettext.py2
-rw-r--r--talinterpreter.py2
-rw-r--r--tests/test_xmlparser.py2
-rw-r--r--translationcontext.py3
-rw-r--r--xmlparser.py3
9 files changed, 11 insertions, 13 deletions
diff --git a/dummyengine.py b/dummyengine.py
index ba49c6f..76b86be 100644
--- a/dummyengine.py
+++ b/dummyengine.py
@@ -30,7 +30,7 @@ name_match = re.compile(r"(?s)(%s):(.*)\Z" % NAME_RE).match
class CompilerError(Exception):
pass
-class DummyEngine:
+class DummyEngine(object):
position = None
source_file = None
@@ -247,7 +247,7 @@ class DummyEngine:
return result.getvalue()
-class Iterator:
+class Iterator(object):
def __init__(self, name, seq, engine):
self.name = name
@@ -266,7 +266,7 @@ class Iterator:
return 1
-class DummyTranslationDomain:
+class DummyTranslationDomain(object):
implements(ITranslationDomain)
domain = ''
diff --git a/ndiff.py b/ndiff.py
index 85996c8..85dd8de 100644
--- a/ndiff.py
+++ b/ndiff.py
@@ -123,7 +123,7 @@ def IS_CHARACTER_JUNK(ch, ws=" \t"):
del re
-class SequenceMatcher:
+class SequenceMatcher(object):
def __init__(self, isjunk=None, a='', b=''):
# Members:
# a
diff --git a/taldefs.py b/taldefs.py
index 8ee4b0e..429ca96 100644
--- a/taldefs.py
+++ b/taldefs.py
@@ -95,7 +95,7 @@ class I18NError(TALError):
pass
-class ErrorInfo:
+class ErrorInfo(object):
implements(ITALExpressionErrorInfo)
def __init__(self, err, position=(None, None)):
diff --git a/talgenerator.py b/talgenerator.py
index 7cc4d05..bf2fd52 100644
--- a/talgenerator.py
+++ b/talgenerator.py
@@ -31,7 +31,7 @@ I18N_EXPRESSION = 3
_name_rx = re.compile(NAME_RE)
-class TALGenerator:
+class TALGenerator(object):
inMacroUse = 0
inMacroDef = 0
diff --git a/talgettext.py b/talgettext.py
index d06af57..589f764 100644
--- a/talgettext.py
+++ b/talgettext.py
@@ -250,7 +250,7 @@ def main():
return
# We don't care about the rendered output of the .pt file
- class Devnull:
+ class Devnull(object):
def write(self, s):
pass
diff --git a/talinterpreter.py b/talinterpreter.py
index 335c4d4..e7a29f6 100644
--- a/talinterpreter.py
+++ b/talinterpreter.py
@@ -89,7 +89,7 @@ class AltTALGenerator(TALGenerator):
return TALGenerator.replaceAttrs(self, attrlist, repldict)
-class TALInterpreter:
+class TALInterpreter(object):
"""TAL interpreter.
Some notes on source annotations. They are HTML/XML comments added to the
diff --git a/tests/test_xmlparser.py b/tests/test_xmlparser.py
index a519090..69432e3 100644
--- a/tests/test_xmlparser.py
+++ b/tests/test_xmlparser.py
@@ -83,7 +83,7 @@ class EventCollectorExtra(EventCollector):
self.append(("starttag_text", self.get_starttag_text()))
-class SegmentedFile:
+class SegmentedFile(object):
def __init__(self, parts):
self.parts = list(parts)
diff --git a/translationcontext.py b/translationcontext.py
index 687058b..3d870b9 100644
--- a/translationcontext.py
+++ b/translationcontext.py
@@ -18,10 +18,9 @@ needed to perform translation of a marked string from a page template.
$Id$
"""
-
DEFAULT_DOMAIN = "default"
-class TranslationContext:
+class TranslationContext(object):
"""Information about the I18N settings of a TAL processor."""
def __init__(self, parent=None, domain=None, target=None, source=None):
diff --git a/xmlparser.py b/xmlparser.py
index 9165e55..1021a5b 100644
--- a/xmlparser.py
+++ b/xmlparser.py
@@ -15,11 +15,10 @@
This creates a parser with namespace processing enabled.
"""
-
import logging
-class XMLParser:
+class XMLParser(object):
ordered_attributes = 0