# otp.adaptive

### *class* adaptive

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

This class is mostly used as the default value for the functions' parameters
when the value of `None` has some other meaning
or when the meaning of the parameter depends on the other parameter's values,
[otp.config](../../static/configuration/root.md#configuration) options or the context.

### Examples

For example, setting [`DataSource`](../sources/data_source.md#onetick.py.DataSource) `symbols` parameter
to `otp.adaptive` allows to set symbols when running the query later.

```pycon
>>> data = otp.DataSource('SOME_DB', tick_type='TT', symbols=otp.adaptive)
>>> otp.run(data, symbols='S1')
                     Time  X
0 2003-12-01 00:00:00.000  1
1 2003-12-01 00:00:00.001  2
2 2003-12-01 00:00:00.002  3
```

This is the default value of `symbols` parameter, so omitting it also works:

```pycon
>>> data = otp.DataSource('SOME_DB', tick_type='TT')
>>> otp.run(data, symbols='S1')
                     Time  X
0 2003-12-01 00:00:00.000  1
1 2003-12-01 00:00:00.001  2
2 2003-12-01 00:00:00.002  3
```
