doubles icon indicating copy to clipboard operation
doubles copied to clipboard

[WIP] Avoid using __dict__

Open thedrow opened this issue 7 years ago • 8 comments

__dict__ is an implementation detail. We should avoid using it.

Fixes #93.

thedrow avatar Apr 01 '18 11:04 thedrow

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 01 '18 11:04 CLAassistant

Coverage Status

Coverage remained the same at 97.689% when pulling c8b047696e0b11f220b61345cc37f10a43d5639e on thedrow:patch-1 into e3814d2ff924b76e4db972c755da4baa250ef941 on uber:master.

coveralls avatar Apr 01 '18 11:04 coveralls

Coverage Status

Coverage remained the same at 97.689% when pulling c8b047696e0b11f220b61345cc37f10a43d5639e on thedrow:patch-1 into e3814d2ff924b76e4db972c755da4baa250ef941 on uber:master.

coveralls avatar Apr 01 '18 11:04 coveralls

Before merging this I need to add tests.

thedrow avatar Apr 01 '18 11:04 thedrow

So it turns out this library indeed doesn't support partial doubles. We can fix the tests because now we get a proper error.

I'd appreciate a code review before going any further.

thedrow avatar Apr 02 '18 08:04 thedrow

@thedrow what do you mean by "indeed doesn't support partial doubles"? Do you have an example?

toddsifleet avatar Apr 02 '18 15:04 toddsifleet

I'm not sure this will solve the problem, because we get errors like AttributeError: 'UserWithSlots' object attribute 'arbitrary_callable' is read-only

I have to think more about how to support objects with __slots__

toddsifleet avatar Apr 02 '18 15:04 toddsifleet

Exactly my point but at least with this PR we get a clearer error message.

thedrow avatar Apr 02 '18 19:04 thedrow