New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

def Type Check exception messages are vague: TypeError: an {type} is required #2023

Open
fried opened this Issue Nov 24, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@fried

fried commented Nov 24, 2017

When defining a def in a .pyx with cython typed arguments, when the wrong type is used the message does not indicate which argument was the offending one

Is it possible to include the name of the argument that caused a TypeError to be raised?

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Nov 25, 2017

Contributor

Depends. Some of these are generated by CPython C-API calls. See DefNodeWrapper in Nodes.py as source of truth.

It's certainly possible to do that, the question is more if it's worth generating additional code for this.

Contributor

scoder commented Nov 25, 2017

Depends. Some of these are generated by CPython C-API calls. See DefNodeWrapper in Nodes.py as source of truth.

It's certainly possible to do that, the question is more if it's worth generating additional code for this.

@scoder scoder changed the title from def Type Check exception messages are vauge: TypeError: an {type} is required to def Type Check exception messages are vague: TypeError: an {type} is required Nov 25, 2017

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