Skip to content

DOC: validate() returns the exception instead of raising it - #580

Open
syahra712 wants to merge 1 commit into
pydata:masterfrom
syahra712:doc/validate-returns-exception
Open

syahra712 wants to merge 1 commit into
pydata:masterfrom
syahra712:doc/validate-returns-exception

Conversation

@syahra712

Copy link
Copy Markdown

Fixes #573

The user guide says ne.validate() "returns None on success or raises an exception on invalid inputs", but it never raises: the exception object is returned, which matches the validate docstring and its Optional[Exception] return type. Someone following the guide with a try/except would silently treat invalid expressions as valid.

This rewords the sentence and adds a short example showing that the return value has to be checked. Docs only, no code changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in numexpr.validate documentation

1 participant