From 46df95cf55fc1d9b9bb2513d47e3e1c9aa401b21 Mon Sep 17 00:00:00 2001 From: "R. Tyler Ballance" Date: Sun, 3 Jan 2010 14:08:33 -0800 Subject: Handle Python3's `slice` objects in SourceReader --- cheetah/SourceReader.py | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/cheetah/SourceReader.py b/cheetah/SourceReader.py index 7a08837..0a44ed0 100644 --- a/cheetah/SourceReader.py +++ b/cheetah/SourceReader.py @@ -12,34 +12,8 @@ class Error(Exception): class SourceReader(object): def __init__(self, src, filename=None, breakPoint=None, encoding=None): - - ## @@TR 2005-01-17: the following comes from a patch Terrel Shumway - ## contributed to add unicode support to the reading of Cheetah source - ## files with dynamically compiled templates. All the existing unit - ## tests pass but, it needs more testing and some test cases of its - ## own. My instinct is to move this up into the code that passes in the - ## src string rather than leaving it here. As implemented here it - ## forces all src strings to unicode, which IMO is not what we want. - # if encoding is None: - # # peek at the encoding in the first two lines - # m = EOLZre.search(src) - # pos = m.end() - # if pos