LibModel.items() confusion
See original GitHub issueThe docs describe LibModel.items()
to
Iterate over (key, value) pairs that this object contains. Computed fields are not included.
This is the case for Item.items()
, but Album.items()
gives all the Item
s associated with the Album
.
LibModel.items()
is actually defined in Model.items()
, and overwritten in the Album
class.
So I’m wondering what the intended behavior is 😃
I know I have used Album.items()
as it currently is in the past (and it seems to me a sensibly named function). Just now I tried to use it in the sense defined in the docs and ran into this problem (although I want computed fields so not using it any more). In the docs sense I guess the items()
mimics dict.items()
, but does create some confusion with Item
s 😄
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to get confusion matrix from the below model?
You can use scikit-learn: from sklearn.metrics import confusion_matrix predicted = model.predict(x_test) print(confusion_matrix(y_test ...
Read more >Vincit/objection.js - Gitter
Im kinda confused on how complicated it is. ... Why can I not insert them like that? await Item.query().insert({ asset, user, shares: 0...
Read more >Depending on sources generated by Java annotation ...
public static GroupBuilder newBuilder() { ... One of thr things that i'm confused about is that we used Dagger 2.1, and that did...
Read more >beets Documentation
If beets finds an album or item in your library that seems to be the same as ... works pretty well for most...
Read more >2. Maintainability depends on modularity: Stop using ...
If things need to be put in the global scope, that code should be ... lib/model.js'); // require a dependency // module implementation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep I think just documenting the conflict would be good. Doesn’t seem like it’s been too much of an issue in the past.
While unfortunate; this seems like a change that would break many third-party plugins. In my opinion, we should avoid renaming
.items()
(unless there’s a stronger reason than being somewhat confusing). Maybe extending theAlbum.items()
docstring to point this out would help to alleviate the issue?