Re: Class Inheritance from different module

2014-09-22 Thread Jean-Michel Pichavant
- Original Message - > From: "Jean-Michel Pichavant" > To: "Juan Christian" > Cc: "Python" > Sent: Monday, 22 September, 2014 1:37:41 PM > Subject: Re: Class Inheritance from different module > > > > cl

Re: Class Inheritance from different module

2014-09-22 Thread Jean-Michel Pichavant
> class User(Inheritance from API): > def __init__(self, ID): > steamapi.core.APIConnection(api_key = KEY) > super( " Inheritance SteamUser" (ID)) # creates the user using the > API > > > [...] > > > So that in my code when I need to create a new user, I just call 'usr > = User("XXX")' ins

Re: Class Inheritance from different module

2014-09-20 Thread Peter Otten
Juan Christian wrote: > I have the following structure: > > Third-party API installed via pip: > steamapi / > app.py > consts.py > core.py > users.py > [...] > > My script: > test.py > > > In the API, the module users.py has a class 'SteamUser' and I want to > mimic it's usage on my code, like

Re: Class Inheritance from different module

2014-09-20 Thread Steven D'Aprano
Juan Christian wrote: [...] > In the API, the module users.py has a class 'SteamUser' and I want to > mimic it's usage on my code, like this: > > import steamapi > > [...] > > class User(Inheritance from API): What do you mean, "Inheritance from API"? You can't inherit from an API, only from c