summaryrefslogtreecommitdiffstats
path: root/Tools/i18n
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-10-02 07:21:43 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-10-02 07:21:43 (GMT)
commit5189ee54cf6fec9f00e0df1ebdeea5cbaef3e18e (patch)
treee35eba9fc2e2a06668d60dfb45fe84df4c561bc6 /Tools/i18n
parentb83f56f91562547a72abe7faf8a023c7929dc731 (diff)
parentb8cd8cf8f20da83b4f42c171114a5d797e7a7647 (diff)
downloadcpython-5189ee54cf6fec9f00e0df1ebdeea5cbaef3e18e.zip
cpython-5189ee54cf6fec9f00e0df1ebdeea5cbaef3e18e.tar.gz
cpython-5189ee54cf6fec9f00e0df1ebdeea5cbaef3e18e.tar.bz2
Issue #20076: Apply optimization in makelocalealias.py repeatedly.
Remove just added the sr_rs.utf8@latn alias because it is derived from sr_rs@latin.
Diffstat (limited to 'Tools/i18n')
-rwxr-xr-xTools/i18n/makelocalealias.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py
index 980465b..25cb337 100755
--- a/Tools/i18n/makelocalealias.py
+++ b/Tools/i18n/makelocalealias.py
@@ -133,7 +133,12 @@ if __name__ == '__main__':
if args.glibc_supported:
data.update(parse_glibc_supported(args.glibc_supported))
data.update(parse(args.locale_alias))
- data = optimize(data)
+ while True:
+ # Repeat optimization while the size is decreased.
+ n = len(data)
+ data = optimize(data)
+ if len(data) == n:
+ break
print_differences(data, locale.locale_alias)
print()
print('locale_alias = {')