Re: Class confusion
# Something like...
return "System Id: bleh"
return "Kernel: bleh"
# Now the code you wrote would work, only return those literals thought,
you'd want to do something meaningful inside of SystemList's methods.
On Wed, Jan 9, 2013 at 3:28 PM, MRAB <email@example.com> wrote:
> On 2013-01-09 20:13, Rodrick Brown wrote:
>> How can I make a class that has methods with attributes and other
>> I see a lot of code
>> I'm reading the documentation to Redhat's Satellite software which has a
>> XMLRPC interface and wrote the following code to test the api.
>> I would like to extend this code to support methods with methods? I see
>> this done a lot in python code but I'm not sure how to accomplish
>> something like this?
>> sc = SatelliteConnect()
>> sc.get_systemlist().get_**systemid() ?
>> How does one chain methods and attributes like this with classes?
> simply means that the method "get_systemlist" returns an instance of
> some class (let's call it "SystemList") which has a method
|All times are GMT. The time now is 07:38 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.