Permalink
Browse files

New-style classes FTW!

--HG--
branch : sneakylang
  • Loading branch information...
1 parent 3840fdd commit 95a537f9c3d7ce15db2bb1c8d68e04252489b5b3 andros committed Mar 20, 2009
Showing with 6 additions and 6 deletions.
  1. +1 −1 sneakylang/expanders.py
  2. +2 −2 sneakylang/node.py
  3. +3 −3 sneakylang/register.py
View
@@ -29,7 +29,7 @@
__all__ = ['Expander', 'TextNodeExpander', 'expand']
-class Expander:
+class Expander(object):
def expand(self, node, format, node_map):
pass
View
@@ -31,7 +31,7 @@
__all__ = ['Node', 'TextNode']
-class Node:
+class Node(object):
def __init__(self):
self.parent = None
self.children = []
@@ -97,4 +97,4 @@ def add_char(self, char):
self.content = u''.join([self.content, unicode(char)])
# def __str__(self):
-# return str(self.content)
+# return str(self.content)
View
@@ -61,7 +61,7 @@ def post_hooks(self, macro, builder):
for hook in self.hooks[macro.__class__]:
hook().post_macro(macro, builder)
-class ParserRegister:
+class ParserRegister(object):
""" Parser register is holding parsers (aka 'alternative syntaxes') allowed to use for parsing.
ParserRegister is also responsible for resolving those alternative syntaxes in stream """
@@ -123,7 +123,7 @@ def resolve_parser(self, stream, register, whole_stream=None):
return None
return parser(stream, self, chunk, register)
-class Register:
+class Register(object):
def __init__(self, macro_list=None, parsers=None):
self.register_map = None
self.macro_map = {}
@@ -203,7 +203,7 @@ def resolve_macro(self, stream, builder, state=None, whole_stream=None):
return (None, None)
-class ExpanderRegister:
+class ExpanderRegister(object):
def __init__(self, expander_map):
self.expander_map = {}
for k in expander_map:

0 comments on commit 95a537f

Please sign in to comment.