diff options
Diffstat (limited to 'Lib/locale.py')
-rw-r--r-- | Lib/locale.py | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/Lib/locale.py b/Lib/locale.py index fd549bb..d3294ce 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -262,10 +262,10 @@ def _test(): setlocale(LC_ALL, "") #do grouping s1 = format("%d", 123456789,1) - print s1, "is", atoi(s1) + print(s1, "is", atoi(s1)) #standard formatting s1 = str(3.14) - print s1, "is", atof(s1) + print(s1, "is", atof(s1)) ### Locale name aliasing engine @@ -1499,49 +1499,49 @@ def _print_locale(): _init_categories() del categories['LC_ALL'] - print 'Locale defaults as determined by getdefaultlocale():' - print '-'*72 + print('Locale defaults as determined by getdefaultlocale():') + print('-'*72) lang, enc = getdefaultlocale() - print 'Language: ', lang or '(undefined)' - print 'Encoding: ', enc or '(undefined)' - print + print('Language: ', lang or '(undefined)') + print('Encoding: ', enc or '(undefined)') + print() - print 'Locale settings on startup:' - print '-'*72 + print('Locale settings on startup:') + print('-'*72) for name,category in categories.items(): - print name, '...' + print(name, '...') lang, enc = getlocale(category) - print ' Language: ', lang or '(undefined)' - print ' Encoding: ', enc or '(undefined)' - print + print(' Language: ', lang or '(undefined)') + print(' Encoding: ', enc or '(undefined)') + print() - print - print 'Locale settings after calling resetlocale():' - print '-'*72 + print() + print('Locale settings after calling resetlocale():') + print('-'*72) resetlocale() for name,category in categories.items(): - print name, '...' + print(name, '...') lang, enc = getlocale(category) - print ' Language: ', lang or '(undefined)' - print ' Encoding: ', enc or '(undefined)' - print + print(' Language: ', lang or '(undefined)') + print(' Encoding: ', enc or '(undefined)') + print() try: setlocale(LC_ALL, "") except: - print 'NOTE:' - print 'setlocale(LC_ALL, "") does not support the default locale' - print 'given in the OS environment variables.' + print('NOTE:') + print('setlocale(LC_ALL, "") does not support the default locale') + print('given in the OS environment variables.') else: - print - print 'Locale settings after calling setlocale(LC_ALL, ""):' - print '-'*72 + print() + print('Locale settings after calling setlocale(LC_ALL, ""):') + print('-'*72) for name,category in categories.items(): - print name, '...' + print(name, '...') lang, enc = getlocale(category) - print ' Language: ', lang or '(undefined)' - print ' Encoding: ', enc or '(undefined)' - print + print(' Language: ', lang or '(undefined)') + print(' Encoding: ', enc or '(undefined)') + print() ### @@ -1553,10 +1553,10 @@ else: __all__.append("LC_MESSAGES") if __name__=='__main__': - print 'Locale aliasing:' - print + print('Locale aliasing:') + print() _print_locale() - print - print 'Number formatting:' - print + print() + print('Number formatting:') + print() _test() |