Skip to content

Commit

Permalink
Fixed partition and rparition. This fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Sep 7, 2010
1 parent ad2734a commit 9d03e68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions markupsafe/__init__.py
Expand Up @@ -181,8 +181,12 @@ def func(self, *args, **kwargs):


# new in python 2.5 # new in python 2.5
if hasattr(unicode, 'partition'): if hasattr(unicode, 'partition'):
partition = make_wrapper('partition'), def partition(self, sep):
rpartition = make_wrapper('rpartition') return tuple(map(self.__class__,
unicode.partition(self, escape(sep))))
def rpartition(self, sep):
return tuple(map(self.__class__,
unicode.rpartition(self, escape(sep))))


# new in python 2.6 # new in python 2.6
if hasattr(unicode, 'format'): if hasattr(unicode, 'format'):
Expand Down

0 comments on commit 9d03e68

Please sign in to comment.