pymzn.stmt2dzn

pymzn.stmt2dzn(name, val, declare=True, assign=True, wrap=True)

Returns a dzn statement declaring and assigning the given value.

Parameters:
  • val – The value to serialize.
  • declare (bool) – Whether to include the declaration of the variable in the statement or just the assignment.
  • assign (bool) – Wheter to include assignment of the value in the statement or just the declaration.
  • wrap (bool) – Whether to wrap the serialized value.
Returns:

The serialized dzn representation of the value.

Return type:

str