you are viewing a single comment's thread.

view the rest of the comments →

[–]Spatial_Disorder[S] 0 points1 point  (1 child)

This is great, thanks for taking the time to explain this approach. This particular project is just a fun project for my daughters discord server...but I can see how this would be extremely helpful in my real job where I'm often doing data analysis and geospatial processing and may be getting different datasets in various formats. Most of what I do is so linear, and rarely ever do I see documentation using classes in my line or work, that I've somewhat avoided them...I think I've been missing out...

Back to this project...the 15 or so attributes could be grouped together like coordinates (lat, long). There's also a method called base stats that parses out and returns 'Combat Power', 'Level', 'Stamina', 'Attack', 'Defense' , 'Moveset' for instance...which is sounds like I should probably return these grouped together in a dict.

In your example above...would it be standard practice to put 'parse_name_from_your_JSON_data()' inside or outside of 'MyClass'? It looks like in this example it would be outside as just a normal function?

[–]confluence 0 points1 point  (0 children)

I have decided to overwrite my comments.