Skip to content
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

Introduction to python exceptions #13

Open
1995parham opened this issue Mar 8, 2024 · 0 comments
Open

Introduction to python exceptions #13

1995parham opened this issue Mar 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@1995parham
Copy link
Contributor

1995parham commented Mar 8, 2024

Raised when an operation or function is applied to an object of inappropriate type. The associated value is a string giving details about the type mismatch.

This exception may be raised by user code to indicate that an attempted operation on an object is not sup
ported, and is not meant to be. If an object is meant to support a given operation but has not yet provided an implementation, NotImplementedError is the proper exception to raise.

Passing arguments of the wrong type (e.g. passing a list when an int is expected) should result in a TypeError, but passing arguments with the wrong value (e.g. a number outside expected boundaries) should result in a ValueError.

https://docs.python.org/3/library/exceptions.html

https://docs.python.org/3/tutorial/errors.html#tut-userexceptions

@1995parham 1995parham added the enhancement New feature or request label Mar 8, 2024
@1995parham 1995parham self-assigned this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant