Selectorlist extract first #624
Closed
Conversation
…y into selectorlist-extract-first
code looks ok |
@@ -169,9 +169,17 @@ def css(self, xpath): | |||
def re(self, regex): | |||
return flatten([x.re(regex) for x in self]) | |||
|
|||
def re_first(self, regex): | |||
for el in iflatten((x.re(regex) for x in self)): |
kmike
Apr 15, 2014
Member
iflatten(x.re(regex) for x in self)
should also work
iflatten(x.re(regex) for x in self)
should also work
@ananana hi! Sorry for such late follow up, we're planning on (finally) getting this pull request merged. There are some tasks still needed for doing so. Second, last commit (0587132) is a merge, it'd be best if it wasn't, we use merge commits for merging pull requests, so it's preferred that all commits from a given pull request are simple commits. Are you interested in making these changes? Let us know, we can implement them if that's not the case. |
curita
added a commit
that referenced
this pull request
Mar 19, 2015
Merged in ff64584 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixed failed tests in pull request #572 that adds extract_first() method to SelectorList; related to original issue #568