Boolean flags do not take any arguments, and their value is either
True (1) or False (0). The false value is specified on the command
line by prepending the word 'no' to either the long or the short flag
name.
For example, if a Boolean flag was created whose long name was
'update' and whose short name was 'x', then this flag could be
explicitly unset through either --noupdate or --nox.
Attributes
value
Methods
flag_type
flag_type()->Text
Returns a str that describes the type of the flag.
parse
parse(argument:Union[Text,Optional[_T]])->None
Parses string and sets flag value.
Args
argument
str or the correct flag value type, argument to be parsed.
serialize
serialize()->Text
Serializes the flag.
unparse
unparse()->None
__bool__
__bool__()
__eq__
__eq__(other)
Return self==value.
__ge__
__ge__(other,NotImplemented=NotImplemented)
Return a >= b. Computed by @total_ordering from (not a < b).
__gt__
__gt__(other,NotImplemented=NotImplemented)
Return a > b. Computed by @total_ordering from (not a < b) and (a != b).
__le__
__le__(other,NotImplemented=NotImplemented)
Return a <= b. Computed by @total_ordering from (a < b) or (a == b).
[[["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 2023-10-06 UTC."],[],[],null,["# tf.compat.v1.flags.BooleanFlag\n\n\u003cbr /\u003e\n\nBasic boolean flag.\n\nInherits From: [`Flag`](../../../../tf/compat/v1/flags/Flag) \n\n tf.compat.v1.flags.BooleanFlag(\n name: Text,\n default: Union[Optional[bool], Text],\n help: Optional[Text],\n short_name: Optional[Text] = None,\n **args\n ) -\u003e None\n\nBoolean flags do not take any arguments, and their value is either\n`True` (1) or `False` (0). The false value is specified on the command\nline by prepending the word `'no'` to either the long or the short flag\nname.\n\nFor example, if a Boolean flag was created whose long name was\n`'update'` and whose short name was `'x'`, then this flag could be\nexplicitly unset through either `--noupdate` or `--nox`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|---------|---------------|\n| `value` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `flag_type`\n\n flag_type() -\u003e Text\n\nReturns a str that describes the type of the flag.\n| **Note:** we use strings, and not the types.\\*Type constants because our flags can have more exotic types, e.g., 'comma separated list of strings', 'whitespace separated list of strings', etc.\n\n### `parse`\n\n parse(\n argument: Union[Text, Optional[_T]]\n ) -\u003e None\n\nParses string and sets flag value.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|------------|------------------------------------------------------------|\n| `argument` | str or the correct flag value type, argument to be parsed. |\n\n\u003cbr /\u003e\n\n### `serialize`\n\n serialize() -\u003e Text\n\nSerializes the flag.\n\n### `unparse`\n\n unparse() -\u003e None\n\n### `__bool__`\n\n __bool__()\n\n### `__eq__`\n\n __eq__(\n other\n )\n\nReturn self==value.\n\n### `__ge__`\n\n __ge__(\n other, NotImplemented=NotImplemented\n )\n\nReturn a \\\u003e= b. Computed by @total_ordering from (not a \\\u003c b).\n\n### `__gt__`\n\n __gt__(\n other, NotImplemented=NotImplemented\n )\n\nReturn a \\\u003e b. Computed by @total_ordering from (not a \\\u003c b) and (a != b).\n\n### `__le__`\n\n __le__(\n other, NotImplemented=NotImplemented\n )\n\nReturn a \\\u003c= b. Computed by @total_ordering from (a \\\u003c b) or (a == b).\n\n### `__lt__`\n\n __lt__(\n other\n )\n\nReturn self\\\u003cvalue."]]