##// END OF EJS Templates
Use raw string when invalid escape sequence present....
Matthias Bussonnier -
Show More
@@ -176,7 +176,7 b' class Tracer(object):'
176 176 self.debugger.set_trace(sys._getframe().f_back)
177 177
178 178
179 RGX_EXTRA_INDENT = re.compile('(?<=\n)\s+')
179 RGX_EXTRA_INDENT = re.compile(r'(?<=\n)\s+')
180 180
181 181
182 182 def strip_indentation(multiline_string):
@@ -202,7 +202,7 b' def get_home_dir(require_writable=False):'
202 202 import _winreg as wreg # Py 2
203 203 key = wreg.OpenKey(
204 204 wreg.HKEY_CURRENT_USER,
205 "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
205 r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
206 206 )
207 207 homedir = wreg.QueryValueEx(key,'Personal')[0]
208 208 key.Close()
@@ -588,7 +588,7 b' class DollarFormatter(FullEvalFormatter):'
588 588 In [4]: f.format('$a or {b}', a=1, b=2)
589 589 Out[4]: '1 or 2'
590 590 """
591 _dollar_pattern_ignore_single_quote = re.compile("(.*?)\$(\$?[\w\.]+)(?=([^']*'[^']*')*[^']*$)")
591 _dollar_pattern_ignore_single_quote = re.compile(r"(.*?)\$(\$?[\w\.]+)(?=([^']*'[^']*')*[^']*$)")
592 592 def parse(self, fmt_string):
593 593 for literal_txt, field_name, format_spec, conversion \
594 594 in Formatter.parse(self, fmt_string):
General Comments 0
You need to be logged in to leave comments. Login now