sphobjinv icon indicating copy to clipboard operation
sphobjinv copied to clipboard

Implement __getitem__ to index into .objects

Open bskinn opened this issue 7 years ago • 0 comments

More Pythonic. Starting with just getitem as it's straightforward to implement and the other list functions would only be useful in advanced editing/creation scenarios.

OTOH, POLA would indicate implementing none or all...

ONLY IMPLEMENT in combo with #43!

Numeric key/index seems straightforward.

A more mapping-like interface, say where one can pass the name to be found, would also have been useful here. A catch with this is that names aren't guaranteed to be unique within the inventory. Would have to address this somehow.

bskinn avatar Dec 24 '17 14:12 bskinn