Add positional args support for fdl.Config.#449
Open
copybara-service[bot] wants to merge 1 commit into
Open
Conversation
copybara-service
Bot
force-pushed
the
test_549731020
branch
from
July 26, 2023 00:33
78b48c5 to
5d6cfba
Compare
fdl.Configfdl.Config.
copybara-service
Bot
force-pushed
the
test_549731020
branch
from
August 18, 2023 17:47
5d6cfba to
3b416cc
Compare
`config.posargs` returns the *args list and can be accessed directly. To access positional args: ```python v = config.posargs # the full list v = config.posargs[-1] # normal index v = config.posargs[:3] # slice index v = config[-1] # normal index v = config[:] # slice index ``` To modify positional args: ```python config.posargs = [1, 2] # assign to a new list, config.posargs = config.posargs.append(3) # append one item config.posargs = config.posargs + [3] # append one item config[0] = 0 config[:] = [1, 2, 3] ``` PiperOrigin-RevId: 549731020
copybara-service
Bot
force-pushed
the
test_549731020
branch
from
August 18, 2023 17:52
3b416cc to
2f934d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add positional args support for
fdl.Config.config.posargsreturns the *args list and can be accessed directly.To access positional args:
To modify positional args: