class Tuple(_instance_base.Instance, mixin.PythonConstant): (source)
Known subclasses: pytype.overlays.sys_overlay.VersionInfo
Representation of Python 'tuple' objects.
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Initialize a SimpleValue. |
Method | get |
Undocumented |
Method | str |
Get a string representation of this constant. |
Instance Variable | is |
Undocumented |
Instance Variable | tuple |
Undocumented |
Method | _is |
True if the tuple contains itself. |
Method | _unique |
Get unique parameter subtypes as variables. |
Instance Variable | _hash |
Undocumented |
Inherited from Instance
:
Instance Variable | cls |
Undocumented |
Property | full |
Undocumented |
Property | instance |
Undocumented |
Method | _load |
Undocumented |
Instance Variable | _container |
Undocumented |
Instance Variable | _instance |
Undocumented |
Instance Variable | _instance |
Undocumented |
Inherited from SimpleValue
(via Instance
):
Method | __repr__ |
Undocumented |
Method | argcount |
Returns the minimum number of arguments needed for a call. |
Method | call |
Call this abstract value with the given arguments. |
Method | cls |
Undocumented |
Method | get |
Get a cfg.Variable of the instance's values for the type parameter. |
Method | get |
Build a key from the information used to perform type matching. |
Method | has |
Check if the key is in `instance_type_parameters`. |
Method | instantiate |
Create an instance of self. |
Method | maybe |
Undocumented |
Method | merge |
Set the value of a type parameter. |
Method | set |
Set the __class__ of an instance, for code that does "x.__class__ = y. |
Method | update |
Undocumented |
Instance Variable | members |
Undocumented |
Property | maybe |
Undocumented |
Method | _call |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Instance Variable | _cached |
Undocumented |
Instance Variable | _cls |
Undocumented |
Instance Variable | _fullhash |
Undocumented |
Instance Variable | _maybe |
Undocumented |
Instance Variable | _type |
Undocumented |
Inherited from BaseValue
(via Instance
, SimpleValue
):
Method | compute |
Undocumented |
Method | default |
Undocumented |
Method | get |
Undocumented |
Method | get |
Gets a default type key. See get_type_key. |
Method | get |
Get the class's type for the type parameter. |
Method | get |
Get the type an instance of us would have. |
Method | get |
Get this value's __new__ method, if it isn't object.__new__. |
Method | get |
Fetch a special attribute (e.g., __get__, __iter__). |
Method | has |
Return True if this is a function and has a **kwargs parameter. |
Method | has |
Return True if this is a function and has a *args parameter. |
Method | init |
Allow metaprogramming via __init_subclass__. |
Method | is |
Undocumented |
Method | module |
Undocumented |
Method | official |
Undocumented |
Method | property |
Bind this value to the given self or cls. |
Method | register |
Treating self as a class definition, register an instance of it. |
Method | should |
Undocumented |
Method | to |
Undocumented |
Method | to |
Undocumented |
Method | to |
Get a PyTD definition for this object. |
Method | to |
Get a PyTD type representing this object, as seen at a node. |
Method | to |
Build a variable out of this abstract value. |
Method | unique |
Get unique parameter subtypes as bindings. |
Method | update |
Update the official name. |
Class Variable | formal |
Undocumented |
Instance Variable | final |
Undocumented |
Instance Variable | from |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | mro |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | slots |
Undocumented |
Property | all |
Undocumented |
Property | module |
Undocumented |
Property | official |
Undocumented |
Property | template |
Undocumented |
Instance Variable | _all |
Undocumented |
Instance Variable | _instance |
Undocumented |
Instance Variable | _module |
Undocumented |
Instance Variable | _official |
Undocumented |
Instance Variable | _template |
Undocumented |
Inherited from ContextWeakrefMixin
(via Instance
, SimpleValue
, BaseValue
):
Class Variable | __slots__ |
Undocumented |
Instance Variable | ctx |
Undocumented |
Property | ctx |
Undocumented |
Inherited from PythonConstant
(via Instance
, SimpleValue
, BaseValue
, ContextWeakrefMixin
):
Method | init |
Mix-in equivalent of __init__. |
Class Variable | overloads |
Undocumented |
Instance Variable | pyval |
Undocumented |
Instance Variable | _printing |
Undocumented |
Initialize a SimpleValue. Args: name: Name of this value. For debugging and error reporting. ctx: The abstract context.
Get a string representation of this constant. Args: printer: A BaseValue -> str function that will be used to print abstract values. Returns: A string of self.pyval.
Get unique parameter subtypes as variables. This will retrieve 'children' of this value that contribute to the type of it. So it will retrieve type parameters, but not attributes. To keep the number of possible combinations reasonable, when we encounter multiple instances of the same type, we include only one. Returns: A list of variables.