Show More
@@ -176,7 +176,7 b' class Tracer(object):' | |||||
176 | self.debugger.set_trace(sys._getframe().f_back) |
|
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 | def strip_indentation(multiline_string): |
|
182 | def strip_indentation(multiline_string): |
@@ -202,7 +202,7 b' def get_home_dir(require_writable=False):' | |||||
202 | import _winreg as wreg # Py 2 |
|
202 | import _winreg as wreg # Py 2 | |
203 | key = wreg.OpenKey( |
|
203 | key = wreg.OpenKey( | |
204 | wreg.HKEY_CURRENT_USER, |
|
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 | homedir = wreg.QueryValueEx(key,'Personal')[0] |
|
207 | homedir = wreg.QueryValueEx(key,'Personal')[0] | |
208 | key.Close() |
|
208 | key.Close() |
@@ -588,7 +588,7 b' class DollarFormatter(FullEvalFormatter):' | |||||
588 | In [4]: f.format('$a or {b}', a=1, b=2) |
|
588 | In [4]: f.format('$a or {b}', a=1, b=2) | |
589 | Out[4]: '1 or 2' |
|
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 | def parse(self, fmt_string): |
|
592 | def parse(self, fmt_string): | |
593 | for literal_txt, field_name, format_spec, conversion \ |
|
593 | for literal_txt, field_name, format_spec, conversion \ | |
594 | in Formatter.parse(self, fmt_string): |
|
594 | in Formatter.parse(self, fmt_string): |
General Comments 0
You need to be logged in to leave comments.
Login now