Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/python/guides/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ flags have other arguments, which are described with the flag.
* `DEFINE_enum`: takes a list of strings that represents legal values. If the
command-line value is not in this list, it raises a flag error; otherwise,
it assigns to `FLAGS.flag` as a string.
* `DEFINE_enum_class`: takes a subclass of `enum.Enum` that represents legal
values. If the command-line value is not in this enum (ignoring the case),
it raises a flag value error; otherwise, it assigns to `FLAGS.flag`
as an Enum.
* `DEFINE_list`: Takes a comma-separated list of strings on the command line
and stores them in a Python list object.
* `DEFINE_spaceseplist`: Takes a space-separated list of strings on the
Expand All @@ -86,6 +90,10 @@ flags have other arguments, which are described with the flag.
* `DEFINE_multi_enum`: The same as `DEFINE_enum`, except the flag can be
specified more than once on the command line. The result is a Python list
object (list of strings), even if the flag is only on the command line once.
* `DEFINE_multi_enum`: The same as `DEFINE_enum_class`, except the flag can be
specified more than once on the command line. The result is a Python list
object (list of `Enum`s), even if the flag is only on the command line once.
* `DEFINE_alias`: Defines an alias flag for an existing one.

## Special Flags

Expand Down