Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get only one item from inventory, directly #147

Closed
lucmurer opened this issue Aug 17, 2023 · 0 comments · Fixed by #150
Closed

Get only one item from inventory, directly #147

lucmurer opened this issue Aug 17, 2023 · 0 comments · Fixed by #150
Assignees
Labels
enhancement New feature or request

Comments

@lucmurer
Copy link
Collaborator

Status quo:
At the moment Inventory.get() returns a dictionary of items, even if there is only one item.

Proposed enhancement:
Add a method to receive one item directly with the same parameters as the "get" function:

  • without the need to extract it from a directory
  • which returns None if no such item is found
  • which will throw an exception if more than one item is found.
@lucmurer lucmurer added the enhancement New feature or request label Aug 17, 2023
@patrikspiess patrikspiess self-assigned this Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants