diff options
author | Curtis Bucher <cpbucher5@gmail.com> | 2020-03-23 19:02:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 19:02:05 (GMT) |
commit | f393b2c588559162dc2e77f8079a42e48558870a (patch) | |
tree | 28bd1ee4ecf3104e76a7df28622aadc714400c6e /Misc | |
parent | 8ec7370c89aa522602eb9604086ce9f09770953d (diff) | |
download | cpython-f393b2c588559162dc2e77f8079a42e48558870a.zip cpython-f393b2c588559162dc2e77f8079a42e48558870a.tar.gz cpython-f393b2c588559162dc2e77f8079a42e48558870a.tar.bz2 |
bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832)
* Update ChainMap to include | and |=
Created __ior__, __or__ and __ror__ methods in ChainMap class.
* Update ACKS
* Update docs
* Update test_collections.py to include test_issue584().
Added testing for | and |= operators for ChainMap objects.
* Update test_union_operators
Renamed test_union operators, fixed errors and style problems raised by brandtbucher.
* Update test_union_operators in TestChainMap
Added testing for union operator between ChainMap and iterable of key-value pairs.
* Update test_union operators in test_collections.py
Gave more descriptive variable names and eliminated unnecessary tmp variable.
* Update test_union_operators in test_collections.py
Added cm3
* Check .maps rather than Chainmap equality.
* Add news entry
* Update Lib/test/test_collections.py
Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
* Removed whitespace
* Added Guido's changes
* Fixed Docs
* Removed whitespace
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-03-07-11-26-08.bpo-36144.FG9jqy.rst | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -233,6 +233,7 @@ Floris Bruynooghe Matt Bryant Stan Bubrouski Brandt Bucher +Curtis Bucher Colm Buckley Erik de Bueger Jan-Hein Bührman diff --git a/Misc/NEWS.d/next/Library/2020-03-07-11-26-08.bpo-36144.FG9jqy.rst b/Misc/NEWS.d/next/Library/2020-03-07-11-26-08.bpo-36144.FG9jqy.rst new file mode 100644 index 0000000..9deb489 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-07-11-26-08.bpo-36144.FG9jqy.rst @@ -0,0 +1 @@ +Added :pep:`584` operators (``|`` and ``|=``) to :class:`collections.ChainMap`. |