[Tutor] Good approach regarding classes attributes
Peter Otten
__peter__ at web.de
Mon Sep 8 10:58:34 CEST 2014
Juan Christian wrote:
> I'll definitely use the '@property' decoration. Thanks for the tip,
Personally I'd use normal attributes, though.
> so, a
> different module to accommodate all the API requests and one for the
> logic/code itself is a better approach, right?
A separate function or method should be sufficient.
> Creating new users won't exist, my program is like a Home Broker using the
> Steam API. This 'User' class will be mainly used to properly store the
> users data, I'll automatically and recursively go trough my (or any
> person) friend-list and fetch users info and inventory and properly use it
> in my favor.
It is always a good idea to give such background right from the start. There
are existing wrappers of that API. You might adopt one or at least have a
look at the code to see how they are solving the issues you encounter.
More information about the Tutor
mailing list