-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Make _LxmlFrameParser more extensible #5130
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
Comments
no issues... would be happy to have your contrib... i think you could have a parameter that controls this like |
marking for 0.14 |
@cancan101 FYI i'm going to assign myself to this issue to follow it so that it doens't get lost in the mix |
not sure if that's visible to non repo collabs ... just letting you know |
@cpcloud That's fine. Yes it does show up that it was assigned to you. |
@cpcloud That reason to make another class (as opposed to just a parameter) is the valid parsers are specified as classes:
I suppose I could use a closure / partial (http://docs.python.org/2/library/functools.html#functools.partial) but that seems a bit messy. |
class is fine ... i was thinking about the user facing API |
ah. Actually I could create a method with signature
and then:
|
i would prefer if you didn't mix my class naming convention with function names |
Much simpler: |
@jtratner I had initially justed used a method rather than a class (albeit it was not anonymous). That being said, having the class allows me to put notes / docs. See: cancan101@91e7e5c#diff-a768e0e688020658ae7fb0dc23609b78L576 |
These are all internal classes, nobody will see the docstring or documentation. Moreover, you can really just summarize it as:
Also, I just learned you can set kewyord argument defaults on lambdas, so can do:
|
heck, you could even do this:
|
i think @cancan101 was going to do that originally... |
that lambda expression is a bit large ... :) |
that technique is useful for passing closures around too |
Yep! #5130 (comment) |
Ok how about the partial approach and then a note under flavor? Should I copy what I have now for notes or should I strip it down? Most of what I have came directly from lxml docs. |
Closing ... getting a bit stale ... and again should be for maybe a more in-depth html-pandas-parsing library. |
Allow creating a
_LiberalLxmlFrameParser
(see conversation on: #4469 (comment))For now I will factor out:
so that subclass can change the behavior.
Would there be an issue with adding
_LiberalLxmlFrameParser
to the Pandas codebase?The text was updated successfully, but these errors were encountered: