* Add "global variable" statement.

master
Wirawan Purwanto 11 years ago
parent 869aa91109
commit 42babbe767
  1. 1
      text_tools.py

@ -161,6 +161,7 @@ def str_fmt_heading(fmt):
# #
#_str_fmt_heading_rx = None # only for development purposes #_str_fmt_heading_rx = None # only for development purposes
import re import re
global _str_fmt_heading_rx
if _str_fmt_heading_rx == None: if _str_fmt_heading_rx == None:
# Because of complicated regex, I verbosely write it out here: # Because of complicated regex, I verbosely write it out here:
_str_fmt_heading_rx = re.compile(r""" _str_fmt_heading_rx = re.compile(r"""

Loading…
Cancel
Save