Skip to content

REF: share _union between DTI/TDI #30714

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

Merged
merged 1 commit into from
Jan 6, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

No description provided.

@@ -806,6 +806,25 @@ def _fast_union(self, other, sort=None):
else:
return left

def _union(self, other, sort):
Copy link
Contributor

Choose a reason for hiding this comment

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

other can a Union[DTI, TDI]

Copy link
Member Author

Choose a reason for hiding this comment

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

@simonjayhawkins what's the preferred way of typing as type(self)?

Copy link
Member

Choose a reason for hiding this comment

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

def _union(self: _T, other: Type[_T], sort):

Copy link
Member Author

Choose a reason for hiding this comment

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

where does _T come from? I dont see this pattern anywhere else in the code

Copy link
Member Author

Choose a reason for hiding this comment

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

i vote for merging and adding annotations in follow-up

Copy link
Contributor

Choose a reason for hiding this comment

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

followup ok

@jreback jreback added Clean Index Related to the Index class or subclasses Timedelta Timedelta data type Datetime Datetime data dtype labels Jan 5, 2020
@jreback jreback added this to the 1.0 milestone Jan 5, 2020
@jreback jreback merged commit b187a0d into pandas-dev:master Jan 6, 2020
@jbrockmendel jbrockmendel deleted the ref-share4 branch January 6, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Datetime Datetime data dtype Index Related to the Index class or subclasses Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants