Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
ENH: adding suggested names to ColormapRegistry missing key error#28115
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
difflib.get_close_match has been in the standard library from Python 2.1
Uh oh!
There was an error while loading.Please reload this page.
(We don't have to do this now; just leaving a comment as a note.) It would be nice to be able to reuse CPython's attribute suggestions algorithm, but it looks like it's not exposed externally (other than calling excepthook and parsing stderr...); see alsoipython/ipython#13445 (ipython having to reimplement it). |
Ah, I thought this was cpython's suggestion algorithm. |
Maintains the status-quoCo-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
For reference, cpython appears to use Levenshtein distance (python/cpython@37494b4#diff-aad873b2c81d05628e415ef526dbd8845ebe4bf85b2d9c6d83d6cdf804b6e7b7) where as It looks like I think the reasonable options are:
|
I'm leaning to
which means a bunch more work. I'll try to get back to this, but if someone wants to take this over I will not be mad! |
Would that produce better results? |
Yes, what's the difference? If difflib gives reasonable results. I would stick with that as "good enough" before writing/vendoring any additional code. |
Closing in favor of#30001 |
difflib.get_close_match has been in the standard library from Python 2.1
PR summary
Make use of a function in the standard library to give suggestions for missed
PR checklist
I don't think this needs to be called out in the release notes.