On 05.06.2018 3:09, Matthias Bussonnier wrote:
This may even be a bug/feature of IPython,
I see that inspect.signature(timedelta) fails, so if timedelta? saysInit signature: timedelta(self, /, *args, **kwargs)Then this may be some IPython internal logic. The timedelta class seem to use __new__ instead of __init__ (not sure why)Because it's an immutable type.
and __new__ have a meaningful signature,
So maybe we should fallback on that during signature inspection.
According to https://stackoverflow.com/questions/4374006/check-for-mutability-in-python ,
there are no reliable tests for mutability.