Skip to content

Give all NotImplementedErrors a description #7872

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

Closed
hayd opened this issue Jul 29, 2014 · 4 comments
Closed

Give all NotImplementedErrors a description #7872

hayd opened this issue Jul 29, 2014 · 4 comments
Labels
Code Style Code style, linting, code_checks Docs Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@hayd
Copy link
Contributor

hayd commented Jul 29, 2014

Currently some NotImplementedErrors don't have a description (most do!) .

raise NotImplemented
# should be
raise NotImplemented("short description of thing which isn't implemented")

I think this would be pretty useful, and makes it less confusing for users, and at least they would be pointed in the right direction to request said feature (and know which bit of specifically is NotImplemented)...

You can find them all with grep (probably more usefully the same regex in your text editor):

grep "NotImplementedError$" pandas/**/*.py -r -n
@ilam
Copy link

ilam commented Aug 1, 2014

Fix in #7899 .

I just noticed the PEP8 label.
pep8 | wc -l gave me 17687 pep8 errors.

@jreback
Copy link
Contributor

jreback commented Aug 1, 2014

no pepping

@jreback jreback added this to the 0.15.0 milestone Aug 5, 2014
@jreback jreback modified the milestones: 0.15.1, 0.15.0 Sep 9, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@hoh
Copy link
Contributor

hoh commented Apr 13, 2015

Starting to work on this

hoh added a commit to hoh/pandas that referenced this issue Apr 13, 2015
This issue fixes pandas-dev#7872 by either describing the reason why a NotImplementedError is raised,
or by throwing an AbstractMethodError in the case of abstract methods (eg: Mixins) that
should be overwritten by the inheriting classes.

This issue is based on discussion of PR pandas-dev#7899 which was never merged.
@jreback
Copy link
Contributor

jreback commented Apr 14, 2015

thanks!

@jreback jreback modified the milestones: 0.16.1, Next Major Release Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks Docs Error Reporting Incorrect or improved errors from pandas
Projects
None yet
4 participants