Skip to content

Commit 4c4c58b

Browse files
JelleZijlstramiss-islington
authored andcommitted
gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (GH-149612)
This was added in 3.15; let's use a real sentinel instead of an ad-hoc list object. (cherry picked from commit 884ac3e) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent ad8a3d3 commit 4c4c58b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/urllib/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _hostinfo(self):
277277
return hostname, port
278278

279279

280-
_UNSPECIFIED = ['not specified']
280+
_UNSPECIFIED = sentinel("_UNSPECIFIED", repr="<not specified>")
281281
_MISSING_AS_NONE_DEFAULT = False
282282

283283
class _ResultBase:

0 commit comments

Comments
 (0)