How can i use a dictionnary
brice DORA
road01 at yahoo.fr
Thu Jan 15 06:54:02 EST 2015
Le mardi 13 janvier 2015 14:56:24 UTC, Novocastrian_Nomad a écrit :
> On Tuesday, January 13, 2015 at 2:03:30 AM UTC-7, brice DORA wrote:
> > i consume a web service that return a element whose the type is "instance". but this element seem be a dictionary but when i want to use it like a dictionary, i got some errors. so this is the element and please someone can tell me how can i use it. tkanks in advance.
> >
> >
> > (tCountryInfo){
> > sISOCode = "CI"
> > sName = "Côte D'Ivoire (Ivory Coast)"
> > sCapitalCity = "Yamoussoukro"
> > sPhoneCode = "225"
> > sContinentCode = "AF"
> > sCurrencyISOCode = "XOF"
> > sCountryFlag = "http://www.oorsprong.org/WebSamples.CountryInfo/Images/Côte D'Ivoire.jpg"
> > Languages =
> > (ArrayOftLanguage){
> > tLanguage[] =
> > (tLanguage){
> > sISOCode = "fr"
> > sName = "French"
> > },
> > }
> > }
>
> This data is not a Python dictionary, nor is it a JSON object. You will probably need to code your own conversion function to make it a Python dictionary.
thanks for your help but can you give a example that's you tell about my own conversion funcion. thanks in advance
More information about the Python-list
mailing list