`prompt_toolkit.shortcuts.confirm` doesn't always return `bool`. When pressing just enter it returns a `str`. For example: ```python from prompt_toolkit.shortcuts import confirm result = confirm() print(f"Result|{result}|") print(type(result)) ``` Produces: ``` Confirm? (y/n) ### I press `Enter` here ### Result|| <class 'str'> ``` This is on Windows, using prompt_toolkit 3.0.52 if it matters.
Activity
iliqiliev commentedon Jan 30, 2026
In my opinion, there should be a
defaultparameter, that specifies whetherTrueorFalsewill be returned when pressing Enter.