Determines whether two type definitions are identical.
Note that this notion of equality is stronger than equivalence. Two types
with equivalent definitions may not be identical, e.g., if they represent
templates with differently named type variables in their definitions.
Args
other
The other type to compare against.
Returns
True if type definitions are syntactically identical (as defined above),
otherwise False.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-27 UTC."],[],[],null,["# tff.types.SequenceType\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nAn implementation of [`tff.Type`](../../tff/types/Type) representing types of sequences in TFF.\n\nInherits From: [`Type`](../../tff/types/Type)\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tff.SequenceType`](https://www.tensorflow.org/federated/api_docs/python/tff/types/SequenceType)\n\n\u003cbr /\u003e\n\n tff.types.SequenceType(\n element: object\n )\n\n| **Important:** since `SequenceType` is frequently backed by [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset) which converts `list` to `tuple`, any `SequenceType` constructed with `StructWithPythonType` elements will convert any `list` python container type to `tuple` python container types for interoperability.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `element` | A specification of the element type, either an instance of [`tff.Type`](../../tff/types/Type) or something convertible to it by [`tff.types.to_type`](../../tff/types/to_type). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------|---------------|\n| `element` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `check_assignable_from`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n check_assignable_from(\n source_type: 'Type'\n ) -\u003e None\n\nRaises if values of `source_type` cannot be cast to this type.\n\n### `check_equivalent_to`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n check_equivalent_to(\n other: 'Type'\n ) -\u003e None\n\nRaises if values of 'other' cannot be cast to and from this type.\n\n### `check_identical_to`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n check_identical_to(\n other: 'Type'\n ) -\u003e None\n\nRaises if `other` and `Type` are not exactly identical.\n\n### `children`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n children() -\u003e Iterator[Type]\n\nReturns a generator yielding immediate child types.\n\n### `compact_representation`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n compact_representation() -\u003e str\n\nReturns the compact string representation of this type.\n\n### `formatted_representation`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n formatted_representation() -\u003e str\n\nReturns the formatted string representation of this type.\n\n### `is_assignable_from`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n is_assignable_from(\n source_type: ../../tff/types/Type\n ) -\u003e bool\n\nReturns whether values of `source_type` can be cast to this type.\n\n### `is_equivalent_to`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n is_equivalent_to(\n other: 'Type'\n ) -\u003e bool\n\nReturns whether values of `other` can be cast to and from this type.\n\n### `is_identical_to`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n is_identical_to(\n other: 'Type'\n ) -\u003e bool\n\nReturns whether or not `self` and `other` are exactly identical.\n\n### `__eq__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __eq__(\n other\n )\n\nDetermines whether two type definitions are identical.\n\nNote that this notion of equality is stronger than equivalence. Two types\nwith equivalent definitions may not be identical, e.g., if they represent\ntemplates with differently named type variables in their definitions.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|------------------------------------|\n| `other` | The other type to compare against. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| `True` if type definitions are syntactically identical (as defined above), otherwise `False`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|-----------------------|------------------------------------------|\n| `NotImplementedError` | If not implemented in the derived class. |\n\n\u003cbr /\u003e\n\n### `__ne__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __ne__(\n other\n )\n\nReturn self!=value."]]