| | 62 | |
|---|
| | 63 | <a name='unitproperty_types'><h5>UnitProperty types</h5></a> |
|---|
| | 64 | <p>Dejavu is extensible, and in official specification/API terms, any Python |
|---|
| | 65 | type is allowed as a <tt>UnitProperty.type</tt>. The standard distribution |
|---|
| | 66 | tends to provide full support for: |
|---|
| | 67 | |
|---|
| | 68 | <ul> |
|---|
| | 69 | <li><tt>bool</tt></li> |
|---|
| | 70 | <li><tt>int</tt></li> |
|---|
| | 71 | <li><tt>long</tt></li> |
|---|
| | 72 | <li><tt>float</tt></li> |
|---|
| | 73 | <li><tt>decimal.Decimal</tt></li> |
|---|
| | 74 | <li><tt>fixedpoint.FixedPoint</tt></li> |
|---|
| | 75 | <li><tt>str</tt></li> |
|---|
| | 76 | <li><tt>unicode</tt></li> |
|---|
| | 77 | <li><tt>datetime.date</tt></li> |
|---|
| | 78 | <li><tt>datetime.time</tt></li> |
|---|
| | 79 | <li><tt>datetime.datetime</tt></li> |
|---|
| | 80 | <li><tt>datetime.timedelta</tt></li> |
|---|
| | 81 | <li><tt>tuple</tt></li> |
|---|
| | 82 | <li><tt>list</tt></li> |
|---|
| | 83 | <li><tt>dict</tt></li> |
|---|
| | 84 | </ul> |
|---|
| | 85 | |
|---|
| | 86 | ...where "full support" means that all StorageManagers distributed with |
|---|
| | 87 | Dejavu MUST correctly store these types and SHOULD optimize their storage |
|---|
| | 88 | as well as they can. In many cases, the complex types (tuple, list, dict) |
|---|
| | 89 | are pickled, and indeed any other type that is not represented here tends |
|---|
| | 90 | to be pickled. It's important to realize, however, that different storage |
|---|
| | 91 | managers have complete latitude to optimize as they see fit; for example, |
|---|
| | 92 | the RamStorage class stores values whole, doesn't need to serialize, and |
|---|
| | 93 | therefore does no pickling at all.</p> |
|---|