1=========================================================
2:mod:`PyObjCTools.Conversion` -- Convert data structures
3=========================================================
4
5.. module:: PyObjCTools.Conversion
6   :synopsis: Convert data structures
7   
8Functions for converting between Cocoa and pure Python data structures.
9
10.. function:: propertyListFromPythonCollection(pyCol, conversionHelper=None)
11
12    Convert a Python collection (dictionary, array, tuple, string) into an 
13    Objective-C collection.
14    
15    If conversionHelper is defined, it must be a callable.  It will be called 
16    for any object encountered for which ``propertyListFromPythonCollection()``
17    cannot automatically convert the object.   The supplied helper function 
18    should convert the object and return the converted form.  If the conversion 
19    helper cannot convert the type, it should raise an exception or return None.
20
21.. function:: pythonCollectionFromPropertyList(ocCol, conversionHelper=None)
22
23    Converts a Foundation based collection-- a property list-- into a Python 
24    collection.  Like ``propertyListFromPythonCollection()``, ``conversionHelper``
25    is an optional callable that will be invoked any time an encountered object 
26    cannot be converted.
27