commit | de91d0a265b8c067b1d01d63731684819f62e4bc | [log] [tgz] |
---|---|---|
author | Siavash Khodadadeh <siavash.khodadadeh@gmail.com> | Wed Dec 19 14:05:09 2018 -0800 |
committer | Copybara-Service <copybara-piper@google.com> | Wed Dec 19 14:05:22 2018 -0800 |
tree | 135ed474dc654e39249c05e707bcc866459dabfc | |
parent | 8575d76290eada1a3bcc6da4288cc263f7b3e84b [diff] |
Allow defining multi fields with any Iterable, not just lists. This was motivated to allow tuples as input, but was expanded to allow any iterable. Strings and non-iterables are still special cased and converted to a single-element list. A copy of the input iterable is made so that the flag has sole ownership over the set of values. NOTE: Custom MultiFlag behavior change: The items of the iterable, rather than the iterable itself, are now passed onto the underlying self.parser object. Custom flags using DEFINE_multi or MultiFlag should update their custom flag code as appropriate. NOTE: Heavily modified from original PR to adjust for various lint/style errors and from the auto-formatter. Resolves #78 Closes #80 PiperOrigin-RevId: 226230348
This repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production.
To install the package, simply run:
pip install absl-py
Or install from source:
python setup.py install
To run Abseil tests, you can clone the git repo and run bazel:
git clone https://github.com/abseil/abseil-py.git cd abseil-py bazel test absl/...
Please refer to smoke_tests/sample_app.py as an example to get started.
Full documentation is forthcoming on https://abseil.io. For now, please refer to the in-code Python docstrings.
The current repository includes an initial set of libraries for early adoption. More components and interoperability with Abseil C++ Common Libraries will come in future releases.
The Abseil Python library is licensed under the terms of the Apache license. See LICENSE for more information.