Closed chen-chao closed 4 years ago
If v is an instance of a subclass of BaseVariable, isinstance(v, BaseVariable)
will be True.
I'm pretty sure if you remove that check you will find some tests fail.
Thanks for your answer. Learned a lot from the source code.
Is
isinstance(v, BaseVariable)
here really necessary?v
shouldn't be an instance ofBaseVariable
since it has abstract methods.https://github.com/cool-RR/PySnooper/blob/c0bf4bd0067d8d7618e40d27b2626e6f3cba4fce/pysnooper/tracer.py#L207-L213