mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
This commit is contained in:
parent
43ba8861e0
commit
5affd23e6f
30 changed files with 50 additions and 48 deletions
|
@ -512,7 +512,8 @@ def _build_localename(localetuple):
|
|||
else:
|
||||
return language + '.' + encoding
|
||||
except (TypeError, ValueError):
|
||||
raise TypeError('Locale must be None, a string, or an iterable of two strings -- language code, encoding.')
|
||||
raise TypeError('Locale must be None, a string, or an iterable of '
|
||||
'two strings -- language code, encoding.') from None
|
||||
|
||||
def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue