diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-27 09:10:47 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-27 09:10:47 -0500 |
commit | 579288c5eb684dd09d1ef298929a566f40151205 (patch) | |
tree | d10a50f91b8606cd1dea38764168abab92958b0f /markdown/extensions/__init__.py | |
parent | b37ab16ba56ac6fe4e64f87521996bad323058f2 (diff) | |
download | markdown-579288c5eb684dd09d1ef298929a566f40151205.tar.gz markdown-579288c5eb684dd09d1ef298929a566f40151205.tar.bz2 markdown-579288c5eb684dd09d1ef298929a566f40151205.zip |
Now using universal code for Python 2 & 3.
The most notable changes are the use of unicode_literals
and absolute_imports. Actually, absolute_imports was the
biggest deal as it gives us relative imports. For the first
time extensions import markdown relative to themselves.
This allows other packages to embed the markdown lib in a
subdir of their project and still be able to use our
extensions.
Diffstat (limited to 'markdown/extensions/__init__.py')
-rw-r--r-- | markdown/extensions/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/markdown/extensions/__init__.py b/markdown/extensions/__init__.py index 0222c91..960d8f9 100644 --- a/markdown/extensions/__init__.py +++ b/markdown/extensions/__init__.py @@ -1,9 +1,10 @@ +from __future__ import unicode_literals """ Extensions ----------------------------------------------------------------------------- """ -class Extension: +class Extension(object): """ Base class for extensions to subclass. """ def __init__(self, configs = {}): """Create an instance of an Extention. @@ -46,6 +47,6 @@ class Extension: * md_globals: Global variables in the markdown module namespace. """ - raise NotImplementedError, 'Extension "%s.%s" must define an "extendMarkdown"' \ - 'method.' % (self.__class__.__module__, self.__class__.__name__) + raise NotImplementedError('Extension "%s.%s" must define an "extendMarkdown"' \ + 'method.' % (self.__class__.__module__, self.__class__.__name__)) |