2021-09-24 15:24:43 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
Skylib module containing functions checking types.
|
|
|
|
|
|
|
|
<a id="#types.is_list"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_list
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_list(<a href="#types.is_list-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a list.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_list-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
True if v is an instance of a list, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
<a id="#types.is_string"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
## types.is_string
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_string(<a href="#types.is_string-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a string.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_string-v"></a>v | The value whose type should be checked. | none |
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
**RETURNS**
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
True if v is an instance of a string, False otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
<a id="#types.is_bool"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_bool
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_bool(<a href="#types.is_bool-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a bool.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_bool-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
True if v is an instance of a bool, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
<a id="#types.is_none"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_none
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_none(<a href="#types.is_none-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v has the type of None.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_none-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
True if v is None, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
<a id="#types.is_int"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_int
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_int(<a href="#types.is_int-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a signed integer.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_int-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
True if v is an instance of a signed integer, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
<a id="#types.is_tuple"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
## types.is_tuple
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_tuple(<a href="#types.is_tuple-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a tuple.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_tuple-v"></a>v | The value whose type should be checked. | none |
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
**RETURNS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
True if v is an instance of a tuple, False otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
<a id="#types.is_dict"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_dict
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_dict(<a href="#types.is_dict-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a dict.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_dict-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
True if v is an instance of a dict, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
<a id="#types.is_function"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## types.is_function
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_function(<a href="#types.is_function-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a function.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_function-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
True if v is an instance of a function, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
<a id="#types.is_depset"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
## types.is_depset
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_depset(<a href="#types.is_depset-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is an instance of a `depset`.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_depset-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
True if v is an instance of a `depset`, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
<a id="#types.is_set"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
## types.is_set
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
types.is_set(<a href="#types.is_set-v">v</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if v is a set created by sets.make().
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="types.is_set-v"></a>v | The value whose type should be checked. | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
True if v was created by sets.make(), False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|