-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: GH12622 where pprint of Timestamp in nested structure fails #12629
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
Conversation
@@ -977,6 +953,30 @@ cdef class _Timestamp(datetime): | |||
self._assert_tzawareness_compat(other) | |||
return _cmp_scalar(self.value, ots.value, op) | |||
|
|||
def __repr__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so moving this to _Timestamp
worked, interesting. Should move any referenced functions as well ,e.g. ._repr_base
. _date_repr
& _time_repr
for consistency.
updated |
@wesm this work for you? |
@kawochen let's put a test in for |
Looks like this should work. Cython esoterica! |
thanks @kawochen |
@kawochen forgot to test for Though does seem to work
|
No problem. Was going to update today :) |
git diff upstream/master | flake8 --diff
I suspect this is a bug in Cython (I don't think
type(A).func
should be aninstancemethod
). Not sure if we should use this workaround as we encounter issues in the wild, or do this for all the functions we can think of.