diff curlers.py @ 10:397c178c5b98

Make it array-based.
author David Barts <n5jrn@me.com>
date Fri, 27 Dec 2019 11:26:00 -0800
parents 9df9ff8cecde
children b2dab0667ec2
line wrap: on
line diff
--- a/curlers.py	Fri Dec 27 09:51:26 2019 -0800
+++ b/curlers.py	Fri Dec 27 11:26:00 2019 -0800
@@ -6,15 +6,15 @@
 # I m p o r t s
 
 import os, sys
-from workspace import Workspace
+from runes import Workspace
 
 # V a r i a b l e s
 
-# Quote types
-LSQUO = "\u2018"
-APOS = RSQUO = "\u2019"
-LDQUO = "\u201C"
-RDQUO = "\u201D"
+# Quote types, as rune values
+LSQUO = 0x2018
+APOS = RSQUO = 0x2019
+LDQUO = 0x201c
+RDQUO = 0x201d
 
 # Words that start with an apostrophe. Cribbed from Wordpress.
 _ASTART = [ "'tain't", "'twere", "'twas", "'tis", "'twill", "'til",
@@ -44,8 +44,6 @@
             ws[i] = "'"
 
 def _is_cockney(pos, ws):
-    pos = self._pos
-    ws = self.workspace
     for i in _ASTART:
         li = len(i)
         if ws[pos:pos+li].lower() == i and not ws[pos+li].isalpha():