
# python wrapper for package go within overall package dither_go
# This is what you import to use the package.
# File is generated by gopy. Do not edit.
# gopy build -no-make -output=dither_go/bindings -vm=python3 ./dither_go github.com/tfuxu/dither-gopy

# the following is required to enable dlopen to open the _go.so file
import os,sys,inspect,collections
try:
	import collections.abc as _collections_abc
except ImportError:
	_collections_abc = collections

cwd = os.getcwd()
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
os.chdir(currentdir)
from . import _dither_go

os.chdir(cwd)

# to use this code in your end-user python file, import it as follows:
# from dither_go import go
# and then refer to everything using go. prefix
# packages imported by this package listed below:


import collections
try:
	import collections.abc as _collections_abc
except ImportError:
	_collections_abc = collections
	
class GoClass(object):
	"""GoClass is the base class for all GoPy wrapper classes"""
	def __init__(self):
		self.handle = 0

# use go.nil for nil pointers 
nil = GoClass()

# need to explicitly initialize it
def main():
	global nil
	nil = GoClass()

main()

def Init():
	"""calls the GoPyInit function, which runs the 'main' code string that was passed using -main arg to gopy"""
	_dither_go.GoPyInit()

	


# ---- Types ---

# Python type for slice []bool
class Slice_bool(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_bool_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_bool.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_bool len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_bool([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_bool_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_bool_len(self.handle)
				return Slice_bool(handle=_dither_go.Slice_bool_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_bool_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_bool_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_bool.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_bool_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_bool_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []byte
class Slice_byte(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_byte_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_byte.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_byte len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_byte([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_byte_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_byte_len(self.handle)
				return Slice_byte(handle=_dither_go.Slice_byte_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_byte_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_byte_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_byte.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_byte_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_byte_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []error
class Slice_error(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_error_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_error.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_error len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_error([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_error_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_error_len(self.handle)
				return Slice_error(handle=_dither_go.Slice_error_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_error_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_error_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_error.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_error_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_error_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []float32
class Slice_float32(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_float32_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_float32.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_float32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_float32([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_float32_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_float32_len(self.handle)
				return Slice_float32(handle=_dither_go.Slice_float32_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_float32_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_float32_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_float32.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_float32_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_float32_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []float64
class Slice_float64(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_float64_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_float64.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_float64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_float64([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_float64_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_float64_len(self.handle)
				return Slice_float64(handle=_dither_go.Slice_float64_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_float64_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_float64_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_float64.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_float64_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_float64_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []int
class Slice_int(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_int_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_int.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_int len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_int([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_int_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_int_len(self.handle)
				return Slice_int(handle=_dither_go.Slice_int_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_int_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_int_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_int.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_int_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_int_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []int16
class Slice_int16(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_int16_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_int16.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_int16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_int16([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_int16_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_int16_len(self.handle)
				return Slice_int16(handle=_dither_go.Slice_int16_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_int16_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_int16_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_int16.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_int16_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_int16_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []int32
class Slice_int32(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_int32_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_int32.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_int32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_int32([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_int32_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_int32_len(self.handle)
				return Slice_int32(handle=_dither_go.Slice_int32_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_int32_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_int32_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_int32.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_int32_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_int32_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []int64
class Slice_int64(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_int64_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_int64.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_int64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_int64([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_int64_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_int64_len(self.handle)
				return Slice_int64(handle=_dither_go.Slice_int64_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_int64_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_int64_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_int64.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_int64_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_int64_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []int8
class Slice_int8(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_int8_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_int8.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_int8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_int8([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_int8_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_int8_len(self.handle)
				return Slice_int8(handle=_dither_go.Slice_int8_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_int8_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_int8_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_int8.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_int8_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_int8_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []rune
class Slice_rune(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_rune_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_rune.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_rune len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_rune([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_rune_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_rune_len(self.handle)
				return Slice_rune(handle=_dither_go.Slice_rune_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_rune_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_rune_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_rune.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_rune_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_rune_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []string
class Slice_string(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_string_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_string.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_string len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_string([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_string_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_string_len(self.handle)
				return Slice_string(handle=_dither_go.Slice_string_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_string_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_string_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_string.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_string_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_string_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []uint
class Slice_uint(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_uint_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_uint.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_uint len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_uint([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_uint_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_uint_len(self.handle)
				return Slice_uint(handle=_dither_go.Slice_uint_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_uint_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_uint_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_uint.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_uint_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_uint_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []uint16
class Slice_uint16(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_uint16_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_uint16.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_uint16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_uint16([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_uint16_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_uint16_len(self.handle)
				return Slice_uint16(handle=_dither_go.Slice_uint16_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_uint16_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_uint16_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_uint16.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_uint16_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_uint16_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []uint32
class Slice_uint32(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_uint32_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_uint32.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_uint32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_uint32([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_uint32_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_uint32_len(self.handle)
				return Slice_uint32(handle=_dither_go.Slice_uint32_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_uint32_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_uint32_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_uint32.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_uint32_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_uint32_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []uint64
class Slice_uint64(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_uint64_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_uint64.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_uint64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_uint64([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_uint64_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_uint64_len(self.handle)
				return Slice_uint64(handle=_dither_go.Slice_uint64_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_uint64_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_uint64_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_uint64.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_uint64_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_uint64_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for slice []uint8
class Slice_uint8(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.Slice_uint8_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('Slice_uint8.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'go.Slice_uint8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go.Slice_uint8([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.Slice_uint8_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.Slice_uint8_len(self.handle)
				return Slice_uint8(handle=_dither_go.Slice_uint8_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _dither_go.Slice_uint8_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.Slice_uint8_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('Slice_uint8.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.Slice_uint8_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.Slice_uint8_append(self.handle, value)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# ---- External Types Outside of Targeted Packages ---

# Python type for *image.Paletted
class Ptr_image_Paletted(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for *image.RGBA
class Ptr_image_RGBA(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for image.Image
class image_Image(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for image.Paletted
class image_Paletted(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for image.Point
class image_Point(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for image.RGBA
class image_RGBA(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for image.Rectangle
class image_Rectangle(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for color.Color
class color_Color(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for color.Model
class color_Model(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for slice color.Palette
class Palette(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		else:
			self.handle = _dither_go.color_Palette_CTor()
			_dither_go.IncRef(self.handle)
			if len(args) > 0:
				if not isinstance(args[0], _collections_abc.Iterable):
					raise TypeError('color_Palette.__init__ takes a sequence as argument')
				for elt in args[0]:
					self.append(elt)
	def __del__(self):
		_dither_go.DecRef(self.handle)
	def __str__(self):
		s = 'color.color_Palette len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'color.color_Palette([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _dither_go.color_Palette_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			if key.step == None or key.step == 1:
				st = key.start
				ed = key.stop
				if st == None:
					st = 0
				if ed == None:
					ed = _dither_go.color_Palette_len(self.handle)
				return Palette(handle=_dither_go.color_Palette_subslice(self.handle, st, ed))
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return go.color_Color(handle=_dither_go.color_Palette_elem(self.handle, key))
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_dither_go.color_Palette_set(self.handle, idx, value.handle)
			return
		raise IndexError('slice index out of range')
	def __iadd__(self, value):
		if not isinstance(value, _collections_abc.Iterable):
			raise TypeError('color_Palette.__iadd__ takes a sequence as argument')
		for elt in value:
			self.append(elt)
		return self
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _dither_go.color_Palette_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration
	def append(self, value):
		_dither_go.color_Palette_append(self.handle, value.handle)
	def copy(self, src):
		""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
		mx = min(len(self), len(src))
		for i in range(mx):
			self[i] = src[i]

# Python type for color.RGBA
class color_RGBA(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for color.RGBA64
class color_RGBA64(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	

# Python type for draw.Image
class draw_Image(GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		"""
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], GoClass):
			self.handle = args[0].handle
			_dither_go.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], int):
			self.handle = args[0]
			_dither_go.IncRef(self.handle)
		else:
			self.handle = 0
	def __del__(self):
		_dither_go.DecRef(self.handle)
	


