QScript Code

From Q
Jump to navigation Jump to search

Code

A data-reduction code, identified by its stable GUID. Returned by QScriptDataReduction.rowCodes/columnCodes and accepted by every operation that takes a code, so codes can be operated on reliably even when several share a label.

equals(other)

True if other is a QScriptCode with the same GUID.
otherThe object to compare against.
Returns:true or false

guid

The code's stable unique identifier within its data reduction.

label

The code's current label. Throws if the code no longer exists.

type

Returns 'Code'.

values

The code's underlying values: numbers for value-based codes, or QScriptVariables for variable-based codes. Throws if the code no longer exists, or for question types that expose neither (e.g. grid, ranking, experiment).