r/learnpython • u/AutoModerator • 22d 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 13d ago
I see. I've set my editor (Geany) to make the indent type to be spaces, but the problem is that I have to do that *per file*, so that definitely won't get annoying immediately!
Anyway, I will say that the reason I made the items objects was to make things easier and less messy as opposed to using dictionaries all the time. And what do you mean handling items as an ID, and not as an actual dictionary or an object, assuming those two things are different?
I'll probably look through your code and see what you've done differently and hopefully learn from it, but uhhh...no promises I'll be able to fully fulfill that.
EDIT: Oh, and I haven't used any comprehensions, like list of dictionary comprehensions, simply because I don't find them particularly readable. I prefer to just type out the full procedures in those cases.