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.
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_bool"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_bool
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_bool(<a href="#types.is_bool-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a bool.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_bool-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a bool, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_depset"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_depset
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_depset(<a href="#types.is_depset-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a `depset`.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
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
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_depset-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
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a `depset`, False otherwise.
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_dict"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_dict
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_dict(<a href="#types.is_dict-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a dict.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_dict-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +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
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_function"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_function
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_function(<a href="#types.is_function-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a function.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_function-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a function, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|
2022-08-30 18:57:34 +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
|
|
|
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_list"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_list
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_list(<a href="#types.is_list-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a list.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_list-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
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a list, False otherwise.
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_none"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_none
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_none(<a href="#types.is_none-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v has the type of None.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_none-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is None, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_set"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_set
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_set(<a href="#types.is_set-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is a set created by sets.make().
|
2019-02-28 22:43:57 +00:00
|
|
|
|
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
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_set-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v was created by sets.make(), False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_string"></a>
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_string
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_string(<a href="#types.is_string-v">v</a>)
|
2019-02-28 22:43:57 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
Returns True if v is an instance of a string.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_string-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a string, False otherwise.
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
<a id="types.is_tuple"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
## types.is_tuple
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
<pre>
|
2024-04-24 21:40:06 +00:00
|
|
|
types.is_tuple(<a href="#types.is_tuple-v">v</a>)
|
2021-09-24 15:24:43 +00:00
|
|
|
</pre>
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
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
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="types.is_tuple-v"></a>v | The value whose type should be checked. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
2024-04-24 21:40:06 +00:00
|
|
|
True if v is an instance of a tuple, False otherwise.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|