Reputation: 6762
I have a response like this:
response['results'][0]
(ImageCreative){
advertiserId = 23
id = 936
name = "Banner01-AvailableforiPhoneiPad"
..
}
I want to extract this ImageCreative
which is showing as type in variables but can't get that value using type(response['results'][0])
How to get that value?
Edit:
[Dbg]>>> type(response['results'][0])
<class 'suds.sudsobject.ImageCreative'>
Upvotes: 2
Views: 30
Reputation: 9931
You can use __name__
to get the class name.
[Dbg]>>> type(response['results'][0]).__name__
'ImageCreative'
__name__
: From docs
definition.__name__
The name of the class, function, method, descriptor, or generator instance.
Upvotes: 2