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
search_src and friends are case-sensitive #7320
Comments
Attachment: trac_7320-case-sensitive.patch.gz |
Reviewer: Karl-Dieter Crisman |
comment:2
Just out of curiosity, is it possible to change the behavior? Obviously that would be a different ticket. That could be useful (or not). Maybe a function that is, and another one that isn't... The new patch is just making the notation for "case-sensitive" uniformly with hyphen, which seemed to be the majority of references in the doc; however, usage in general seems quite variable. One word for the adjective seems right, though. Maybe mvngu will have a comment, so I'm cc:ing him on this. I also added a little to the doctests to make sure we're really doctesting the right thing and compare the two possibilities. |
Fixes a few things, adds doctest - use this |
comment:3
Attachment: trac_7320-case-sensitive.2.patch.gz Replying to @kcrisman:
I think so: I think we can add a flag to the regular expression search to make it case-insensitive. We could add a flag (like |
comment:4
Replying to @kcrisman:
Sometimes I want to search the source with case-sensitivity on. For example, I might be interested in knowing if the source has anything with the word "Euler" in it. As function and method names are lower-case, case-sensitivity search might not return the name of a function/method like "euler_phi". However, if the documentation for "euler_phi" has something like "Euler phi function" or "Euler totient function", then case-sensitivity search would pick up "Euler". Sometimes I want to do a case-insensitivity search. In that case (pun not intended), I would expect that both "euler_phi" and "Euler" be returned by the search. At the end of the day, one can make case-insensitivity search as default, but should also give people the option to do case-sensitivity search. My 2-cent. |
Merged: sage-4.2.1.alpha0 |
The functions
search_src
,search_def
, andsearch_src
are case-sensitive and have been for a while. The documentation says that they're not. This patch changes the documentation to reflect this, and adds one doctest to verify it.CC: @sagetrac-mvngu
Component: misc
Author: John Palmieri
Reviewer: Karl-Dieter Crisman
Merged: sage-4.2.1.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7320
The text was updated successfully, but these errors were encountered: