Repository navigation
Make keyword args explicit - #4019
jbrockmendel wants to merge 1 commit into
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4019 +/- ##
==========================================
- Coverage 79.32% 79.32% -0.01%
==========================================
Files 544 544
Lines 81714 81710 -4
Branches 9255 9253 -2
==========================================
- Hits 64820 64816 -4
Misses 14800 14800
Partials 2094 2094
Continue to review full report at Codecov.
|
|
@josef-pkt I approve of this cleaning |
|
I'm not sure about the general design idea. If we initialize the attributes in the superset of all models, then we get a large number of attributes that are None. That makes dir(object) less informative, and we carry redundant/unused attributes around. e.g. predict uses Given that unit tests pass, the data.formula is not automatically transmitted as attribute to the model
|
|
More predictability, fewer special cases --> Easier to reason about. Explicit is zen. |
|
more attributes to worry about, In any case, it's likely that I agree in this case, after I have time to think about it. |
|
Going on a tangent because this is something interesting I learned about recently:
And really is |
|
The reason why we or I added many hasattr and getattr is that "everything is a special case", i.e. we are adding many attributes and features that are specific to certain use cases (using formulas) or specific to models. example Some attributes can over time become generically required or initialized if the fraction of special cases that need it becomes large. (I don't remember any bug that we had because of the behavior of hasattr or getattr, and I don't remember ever running into py 2 versus py 3 problems with them.) |
48da686 to
b6ec72d
Compare
No description provided.