commit | 20c049df37da20383bdc36e0de6e58f4ebc53659 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Tue Oct 14 21:10:56 2014 +0300 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Tue Oct 14 21:10:56 2014 +0300 |
tree | 5452fb1422c17d643053f7d9d7a5d3532fc1bd30 | |
parent | 9c2ce254bb8a2d36657e620b36207f20047accf5 [diff] [blame] |
Issue #21855: Fixed the decimal module in unicode disabled build.
diff --git a/Lib/decimal.py b/Lib/decimal.py index 19cc50f..07c2cec 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py
@@ -6035,7 +6035,10 @@ format_dict['decimal_point'] = '.' # record whether return type should be str or unicode - format_dict['unicode'] = isinstance(format_spec, unicode) + try: + format_dict['unicode'] = isinstance(format_spec, unicode) + except NameError: + format_dict['unicode'] = False return format_dict