class documentation
>>> tv = TypeVariable() >>> assert isinstance(tv, TypeVariable) >>> repr(tv) "Type(name='@TypeVar...', scope='', args=(), meta=...)" >>> assert tv != TypeVariable() >>> assert Type('@TypeVar43')==Type('@TypeVar43') >>> assert hash(Type('@TypeVar43'))==hash(Type('@TypeVar43'))
| Method | __new__ |
Undocumented |
| Class Method | _reset |
Undocumented |
| Class Variable | _id |
Undocumented |
Inherited from Type:
| Method | __hash__ |
Undocumented |
| Method | __str__ |
Undocumented |
| Method | add |
Get a copy of the Type with the given args added in the list of args. |
| Method | add |
Get a copy of the Type with the given meta informations updated. |
| Method | get |
Undocumented |
| Method | merge |
Get a union of the two given types. |
| Method | supertype |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | overload |
Undocumented |
| Class Variable | |
Undocumented |
| Class Variable | |
Undocumented |
| Instance Variable | __dict__ |
Undocumented |
| Instance Variable | args |
Arguments of a generic type if any. |
| Instance Variable | meta |
Stores meta information when the type annotations are not expressive enougth. Used for intermediate inference steps. |
| Instance Variable | name |
The name of the type. |
| Instance Variable | scope |
The scope where the type is defined. This is often a module, but it migth be a class or a function in some cases. |
| Property | annotation |
Represent the type as a string suitable for type annotations. |
| Property | definition |
Undocumented |
| Property | is |
Undocumented |
| Property | is |
A literal type means it's literal values can be recovered with: |
| Property | is |
Undocumented |
| Property | is |
Undocumented |
| Property | is |
Undocumented |
| Property | is |
No summary |
| Property | is |
Undocumented |
| Property | is |
Undocumented |
| Property | is |
Undocumented |
| Property | is |
Undocumented |
| Property | location |
Undocumented |
| Property | long |
Like annotation but returns the type with qualified names. |
| Property | qualname |
The full name of the type. |
| Property | supertype |
Undocumented |
| Property | unknown |
Undocumented |
| Method | _replace |
Undocumented |