Skip to content

Case insensitive and pattern matching - #1751

Closed
guykisel wants to merge 25 commits into
robotframework:masterfrom
guykisel:pattern_matching
Closed

guykisel wants to merge 25 commits into
robotframework:masterfrom
guykisel:pattern_matching

Conversation

@guykisel

@guykisel guykisel commented Jul 7, 2014

Copy link
Copy Markdown
Contributor

This is for issue #1724

@guykisel

guykisel commented Jul 9, 2014

Copy link
Copy Markdown
Contributor Author

Note this is not ready for merge yet. Still a work in progress.

Comment thread src/robot/utils/match.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to check this explicitly w/ isinstance. Catching AttributeError, especially with this big block, is a bit risky because it can mask bugs.

@pekkaklarck

Copy link
Copy Markdown
Member

I like the idea to implement a generic utility that is used in Colletions and also in BuiltIn. As I already commented in a line note above, I'd like to see the existing Matcher and MultiMatcher to be reused somehow. It seems we could enhance them so that they take regexp=False argument, which controls is the pattern regexp or glob. With regexps _get_and_compile_regexp would use the pattern as regexp directly. I'd like that to be tested with unit tests.

Even if Matcher would be used, there probably should still be separate contains utility. I don't think it would make sense for Matcher to handle non-strings or strings that are not patterns.

Should we chat about this in IRC?

@guykisel guykisel closed this Jul 15, 2014
@guykisel

Copy link
Copy Markdown
Contributor Author

Closing, replaced by newer pull request.

@guykisel
guykisel deleted the pattern_matching branch July 31, 2014 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants