gh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237) · python/cpython@5c984ae · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 5c984ae

Browse files
gh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237)
There is no need to temporary switch locale for items ALT_DIGITS and ERA if the nl_langinfo() result is empty (most locales).
1 parent 8dc3383 commit 5c984ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_localemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ _locale_nl_langinfo_impl(PyObject *module, int item)
692692
result = result != NULL ? result : "";
693693
char *oldloc = NULL;
694694
if (langinfo_constants[i].category != LC_CTYPE
695-
&& (
695+
&& *result && (
696696
#ifdef __GLIBC__
697697
// gh-133740: Always change the locale for ALT_DIGITS and ERA
698698
# ifdef ALT_DIGITS

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.