Repository navigation
Make Quantity and Time/TimeDelta consistent attribute naming - #767
Conversation
|
I'm OK with changing With |
|
Alright, that plan sounds good @taldcroft - we'll leave this as 0.3 then. |
|
Encountered this while looking through old issues -- think this should be tagged 0.3. My suggestion would be to replace |
|
+1 to unnecessarily abbreviated attribute names |
|
@mhvk - your suggestion is fine with me. I don't remember the original motivation for providing the always-vectorized version We need to have a deprecation release (0.3) for |
|
@eteq - I make a quick branch [1] that does the name changes in |
(also tests that Time.now().value works, or any Time(single-datetime).value)
|
@mhvk - your branch is now attached. In the future, it's also fine (perhaps even preferred?) to just create a new PR. As long as one of the commit messages says |
Change __repr__ to use value instead of vals
|
@eteq - thanks! I've merged your PR (yikes! that I missed so many...). also good to learn about the |
|
np - @taldcroft, does this look good to you? looks good to merge to me now. |
Make Quantity and Time/TimeDelta consistent attribute naming
|
Darnit, 5 minutes after merging I had the question of whether |
As @taldcroft noted in #751, the
Timeobject andQuantityobjects have some similar-sounding attributes that are not quite the same.valandvalsforTime/valueforQuantity, andis_scalarforTime/isscalarforQuantity. We should probably adjust these to be the same. Then people don't have to try to remember which is which.Personally, I'm for
value/valuesoverval/vals- it's only a couple more characters and quite a bit more readable.isscalarvsis_scalar: I think I wroteisscalar, and I think I did it that way because it's how thenumpyfunction is named. Also, it's a property rather than a method and attributes/properties in my head aren't underscore-delimited. But I don't think that's in PEP8, so I have no strong opinion.I'm tagging this for 0.3, but if this quickly settles on an answer and is easy to implement, we might slip it into 0.2 to keep from breaking compatibility (@iguananaut ?)