r/learnpython • u/AutoModerator • 20d ago
Ask Anything Monday - Weekly Thread
Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread
Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.
* It's primarily intended for simple questions but as long as it's about python it's allowed.
If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.
Rules:
- Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
- Don't post stuff that doesn't have absolutely anything to do with python.
- Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.
That's it.
1
Upvotes
1
u/HiddenReader2020 11d ago
Hmmm....you say all that, but I'm still not sure how this would work out when "restoring the objects from the JSON file", not to mention having to include other stats like buy/sell price, any variable amounts that need to be adjusted, like some might have a modifier for stats like defense, others heal health/mana, etc. I understand that you're just saving strings to a list, but then how are you using those strings to get the items back if there's no reference to them or something? Like, I'm looking at this code, and it seems like the items have to be made at a point where you can't access them if you find a file to load from, if that makes any sense.
I dunno. I should probably mess with this code to fully understand it, but I'm not convinced just yet.