class_docstr: Wrap GValue in a Python class.
  
  This class wraps :class:`.GValue` in a convenient interface. You can use
  instances of this class to get and set :class:`.GObject` properties.
  
  On construction, :class:`.GValue` is all zero (empty). You can pass it to
  a get function to have it filled by :class:`.GObject`, or use init to
  set a type, set to set a value, then use it to set an object property.
  
  GValue lifetime is managed automatically.
class_docstr_tok: ["Wrap","GValue","in","a","Python","class",".","This","class","wraps",":","class",":","`",".GValue","`","in","a","convenient","interface",".","You","can","use","instances","of","this","class","to","get","and","set",":","class",":","`",".GObject","`","properties",".","On","construction",",",":","class",":","`",".GValue","`","is","all","zero","(","empty",")",".","You","can","pass","it","to","a","get","function","to","have","it","filled","by",":","class",":","`",".GObject","`",",","or","use","init","to","set","a","type",",","set","to","set","a","value",",","then","use","it","to","set","an","object","property",".","GValue","lifetime","is","managed","automatically","."]
docstr: Map a gtype to the name of the Python type we use to represent it.
  
          
docstr_tok: ["Map","a","gtype","to","the","name","of","the","Python","type","we","use","to","represent","it","."]
code: def gtype_to_python(gtype):
      """Map a gtype to the name of the Python type we use to represent it."""
  
      fundamental = gobject_lib.g_type_fundamental(gtype)
  
      # enums can be strings or class members ... we want to generate a union
      # type
      if fundamental == GValue.genum_type:
          name = type_name(gtype)
          if name.startswith("Vips"):
              name = name[4:]
          return "Union[str, %s]" % name
      if gtype in GValue._gtype_to_python:
          return GValue._gtype_to_python[gtype]
      if fundamental in GValue._gtype_to_python:
          return GValue._gtype_to_python[fundamental]
      return "<unknown type>"
  
file_path: pyvips/pyvips/gvalue.py
imports: from __future__ import division
  from __future__ import unicode_literals
  import logging
  import numbers
  import sys
  import pyvips
  from pyvips import ffi, vips_lib, gobject_lib, glib_lib, Error, _to_bytes, _to_string, type_name, type_from_name, at_least_libvips
label_desc: Use image node_id 1 for calling the GValue obj's underlying member method code with example usage: obj.gtype_to_python(gtype) and returns: str, unknown, GValue, GValue