APL and Ultra Field Types for Python (4.0)
The following APL and Ultra field types are supported.Â
Field Type | Python Type | Description |
---|---|---|
|
| Can be assigned any value of any supported type. An actual value can never be of type An See the examples below: udr.anyField = 4096
isinstance(udr.anyField, drint) # True
udr.anyField = "a string"
isinstance(udr.anyField, drstring) # True
udr.anyField = drbyte(3)
isinstance(udr.anyField, drbyte) # True
isinstance(udr.anyField, drany) # Always False |
|
| Bytearray type. The type See the examples below: udr.baField = drbytearray([1,2,3])
udr.baField = bytearray([1,2,3]) |
|
| Boolean value ( The type See the example below: udr.booleanField = True |
|
| Single byte integer value. See the example below: |
|
| Short integer value. See the example below: |
|
| Integer value. See the example below: |
|
| Long integer value. See the example below: |
|
| Storage for any integer value. See the examples below: |
|
| Storage for any integer value with a decimal point. The type See the example below: |
|
| Single-precision floating point. Avoid using See the example below: |
|
| Double-precision floating point. The type See the example below: |
|
| A single character value. See the example below: |
|
| A string value. The type See the example below: |
|
| A date value. Dates are represented as UNIX timestamps and hold information on:
See the example below: The string representation of date always presents the timestamp in UTC. See the drdate example below: To create a date representing now, use: To create a date with only the hastime or hasdate information use: To create a date with a timestamp specified in seconds as a float (timezone is optional) use: Note!The timestamp must be a float. To compare drdates use their timestamps. A date cannot be modified after construction. |
|
| Holds IP address information. Both IPv4 and IPv6 are supported. Use the property See the example below: |
|
| Represents a bit string that grows as needed. The bits are indexed by non-negative integers. See the example below: |
|
| A special type used to hold table data used by the APL table commands. The To access the actual rows and columns you must import and use APL functions to extract the information. See the example below: |
|
| List of objects of a specified type, implements the Python |
|
| Hash map of specified key/value types, implements the Python |
|
| Holds a UDR object. The actual runtime type of the UDR can be checked with See the example below: The Python agents are aware of all UDR types and field types that exist. When assigning fields, Â automatic type conversion is always performed and includes converting numbers to booleans, strings to numbers, numbers to strings, and dictionaries to UDRs. In case types or values mismatch, assigning to a field may result in an exception. |