You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you make a new class C that inherits from a class B with a registered hy-repr function f-B, but don't register a function for C, then hy-repr on an instance of C will call f-B, which can be misleading: it looks like you have an instance of B when actually you have an instance of C. We should probably fall back on repr instead.
For example, pandas's Timestamp class inherits from datetime, so hy-repr on a timestamp will give you the impression that you have a plain datetime.
Removing this feature will mean that hy-repr on a namedtuple will no longer just work, but that's probably an okay trade-off.
The text was updated successfully, but these errors were encountered:
If you make a new class
C
that inherits from a classB
with a registeredhy-repr
functionf-B
, but don't register a function forC
, thenhy-repr
on an instance ofC
will callf-B
, which can be misleading: it looks like you have an instance ofB
when actually you have an instance ofC
. We should probably fall back onrepr
instead.For example, pandas's
Timestamp
class inherits fromdatetime
, sohy-repr
on a timestamp will give you the impression that you have a plaindatetime
.Removing this feature will mean that
hy-repr
on anamedtuple
will no longer just work, but that's probably an okay trade-off.The text was updated successfully, but these errors were encountered: