Skip to content

Commit ad1bd44

Browse files
author
y-p
committed
ENH: short-circuit config lookup when exact key given GH5147
1 parent 87d8ded commit ad1bd44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/core/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ def _select_options(pat):
512512
if pat=="all", returns all registered options
513513
"""
514514

515+
# short-circuit for exact key
516+
if pat in _registered_options:
517+
return [pat]
518+
519+
# else look through all of them
515520
keys = sorted(_registered_options.keys())
516521
if pat == 'all': # reserved key
517522
return keys

0 commit comments

Comments
 (0)