typevalue_tprivate
A Python value.
Components
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| items | type(value_t) | allocatabledimension(:) | the items of a list or tuple, or a dict's keys and values in turn | |
| kind | integer | V_NONE | what it is | |
| number | integer | 0 | the integer, the truth of a bool, or the macro | |
| text | character(len=:) | allocatable | the string |
Type-bound procedures
| Name | Binds to | Attributes | Description |
|---|---|---|---|
| assignment(=) | copy_value | generic | a deep copy, which gfortran gets wrong for a recursive type |
| copy_value | copy_value | private |
Source
Show the code
type :: value_t
!! A Python value.
integer :: kind = V_NONE !! what it is
integer :: number = 0 !! the integer, the truth of a bool, or the macro
character(len=:), allocatable :: text !! the string
type(value_t), allocatable :: items(:) !! the items of a list or tuple, or a dict's keys and values in turn
contains
procedure, private :: copy_value
generic :: assignment(=) => copy_value !! a deep copy, which gfortran gets wrong for a recursive type
end type value_t