[C++-sig] converting dict value to object

yakumoklesk at yahoo.es yakumoklesk at yahoo.es
Tue Sep 16 01:47:25 CEST 2003


Suposing that dictio is a dict boost.python object, making this

dictio['a'] = 3;

it's ok, supossiing that "a" exists in the dictionary. But how can I retieve 
the value? How can I extract an integer or converting the object_item 
returnend by dictio['a'] into a boost.python object?

py:object integer_object = 
CONVERSION_FROM_OBJECT_ITEM_TO_OBJECT(dictio['a']);

How can I do the 
CONVERSION_FROM_OBJECT_ITEM_TO_OBJECT?

Thanks.

David Lucena.

PD.- BTW, Is there any documentation/examples explaining conversion 
policies? It's a little bit hard for me understanding such conversions.









More information about the Cplusplus-sig mailing list