Variant types

All variant types have an overloaded __init__ method, see Godot’s variant type documentation for details on variant constructors. Differences are noted here. All types are also given __str__, __repr__, __copy__, __deepcopy__, and copy methods.

class Array[T]

Typed Array with element type T. If no type is given the Array is untyped.

Note

Python doesn’t enforce types, but Godot does.

class Dictionary
__init__(**kwargs)

Create a Dictionary from keys and values from kwargs.

__init__(mapping)

Create a Dictionary as a copy of a mapping object.

items()

Return a sequence of (key, value) pairs.

class Callable
__call__(*args)

Alias for godot.Callable.call()

get_custom()

Return the original Python callable if available.