Skip to content

Refactor new parser functions to keep them in the parser object#468

Merged
pganssle merged 2 commits into
dateutil:masterfrom
pganssle:refactor_parser
Oct 14, 2017
Merged

Refactor new parser functions to keep them in the parser object#468
pganssle merged 2 commits into
dateutil:masterfrom
pganssle:refactor_parser

Conversation

@pganssle

@pganssle pganssle commented Oct 8, 2017

Copy link
Copy Markdown
Member

As suggested in my earlier review, this moves all the parsing-related functions back into the parser object.

@pganssle pganssle added this to the 2.7.0 milestone Oct 8, 2017
@pganssle
pganssle requested a review from jbrockmendel October 8, 2017 19:23

@jbrockmendel jbrockmendel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This all looks benign. I'm not as enthusiastic about making everything into methods; it seems unlikely that people will really want to override _parsems or _build_tzinfo. But they're private either way, so not a big deal. LGTM.

@pganssle

Copy link
Copy Markdown
Member Author

@jbrockmendel The reason I wanted them all methods is that they are not really reusable outside of the context of the class.

There's a case to be made that they might work better as static or class methods, since they don't rely on any state of the instance, but as you said they are private, so the details are not amazingly important.

@pganssle
pganssle merged commit f07cfc1 into dateutil:master Oct 14, 2017
@pganssle pganssle mentioned this pull request Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants