Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Question: why isn't Char.character_sheet().result['skills'] a dict? #209

Closed
hbbtstar opened this issue May 7, 2015 · 2 comments · Fixed by #215
Closed

Question: why isn't Char.character_sheet().result['skills'] a dict? #209

hbbtstar opened this issue May 7, 2015 · 2 comments · Fixed by #215

Comments

@hbbtstar
Copy link

hbbtstar commented May 7, 2015

out of curiosity, why is that a list and not a dict? For example, wouldn't it be easier to do:

character_sheet.result['skills'][1212]['name']

instead of having to iterate over a list to find a name? (unless I'm an utter dunce and not seeing something obvious).

I'm sure there's a good reason for it, but I just can't see it so I was just asking.

@ayust
Copy link
Member

ayust commented May 7, 2015

Actually I don't think there's a good reason for it - I don't know why it would be a list either. That can change in the next compatibility-breaking update.

@bastianh
Copy link
Contributor

bastianh commented May 7, 2015

I guess best would be a dictionary with namedtuple values ? btw, there is no 'name' in the skills list in the character sheet :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants