Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Collections and String: Add ignore_case as alias for case_insensitive #4954

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
pekkaklarck opened this issue Nov 22, 2023 · 0 comments
Closed

Comments

@pekkaklarck
Copy link
Member

pekkaklarck commented Nov 22, 2023

We added case-insensitive comparison support to various Collections keywords so that keywords got an optional ignore_case argument (#4343). While doing that, we noticed that four Collections keywords already supported case-insensitivity and had case_insensitive argument for that purpose. This kind of inconsistency within a library isn't great, so something needs to be done to it.

An easy solution would be using case_insensitive also with the new keywords. That would make Collections consistent, but because we use ignore_case in BuiltIn (#2439), different libraries would be inconsistent. I believe we should aim for consistency with all standard libraries and also believe that that ignore_case is a better argument name than case_insensitive. It is also consistent with other similar arguments like ignore_order and ignore_keys in Collections.

The plan is to do the following:

  • Add ignore_case argument to Collections keywords that accept case_insensitive. The old argument should be preserved for now, but it should be mentioned in the documentation that the new one is preferred. We shouldn't yet emit deprecation warnings, but we can start doing that in RF 8.0.
  • For consistency reasons, add ignore_whitespace to these same keywords as an alias for whitespace_insensitive. It should be treated the same way a case_insensitive.
  • For consistency reasons, add ignore_case as an alias also for the two String library keywords that accept case_insensitive.

Although we won't be emitting deprecation warnings, it's good to mention this under the deprecated features section in the release notes.

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

No branches or pull requests

1 participant