Skip to main content
`Ctrl`+`K`

# literal_stringizer

literal_stringizer(value)

  Convert a `value` to a Python literal in GML representation.

  Parameters:
    value object

      The `value` to be converted to GML representation.

  Returns:
    rep string

      A double-quoted Python literal representing value. Unprintable characters are replaced by XML character references.

  Raises:
    ValueError

      If `value` cannot be converted to GML.

  Notes

  The original value can be recovered using the `networkx.readwrite.gml.literal_destringizer()` function.