# 3 List of data types

The following is a list of Pyxplot’s data types:

- boolean

- color

- date

- dictionary

- exception

- fileHandle

- function

- instance

- list

- matrix

- module

- null

- number

- string

- type

- vector

Each of these data types has a prototype object in the module `types`, which can be called like a function to create a new object of the type. See Section 2.11 for details of the arguments accepted by each prototype.

All objects in Pyxplot have methods that can be called on them, using the generic syntax:

    object.methodName(arguments)

Some methods are common to all objects. For example, all objects have a method `str()` which produces a string representation of the object, as used by the `print` command. They also all have a `methods()` method, which returns a list of the names of all of the methods available for the object. For example:

`pyxplot> pi.type()`
`data type: number`
`pyxplot> "hello world".methods`
`methods() returns a list of the methods of an object.`
`pyxplot> [3,2,1].len()`
`3`
`pyxplot> time.fromCalendar(2000,1,1,0,0,0).toUnix()`
`946684800`

As the above examples show, printing a method object returns brief documentation about it. The sections below list the methods of each data type.

- 3.1 Methods common to all data types
- 3.2 The `boolean` type
- 3.3 The `color` type
- 3.4 The `date` type
- 3.5 The `dictionary` type
- 3.6 The `exception` type
- 3.7 The `fileHandle` type
- 3.8 The `function` type
- 3.9 The `instance` type
- 3.10 The `list` type
- 3.11 The `matrix` type
- 3.12 The `module` type
- 3.13 The `null` type
- 3.14 The `number` type
- 3.15 The `string` type
- 3.16 The `type` type
- 3.17 The `vector` type