mahmoud / glom

☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
https://glom.readthedocs.io
Other
1.89k stars 61 forks source link

S()-based scope assignment #174

Closed mahmoud closed 4 years ago

mahmoud commented 4 years ago

Per discussion, here's a sketch of what it looks like to assign to the scope using S(var=spec). Personally I like the brevity and symmetry, and not needing another import.

Topics for further discussion:

codecov[bot] commented 4 years ago

Codecov Report

Merging #174 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #174   +/-   ##
=======================================
  Coverage   98.87%   98.88%           
=======================================
  Files          26       26           
  Lines        3998     4029   +31     
  Branches      567      575    +8     
=======================================
+ Hits         3953     3984   +31     
  Misses         21       21           
  Partials       24       24           
Impacted Files Coverage Δ
glom/__init__.py 100.00% <ø> (ø)
glom/core.py 98.65% <100.00%> (+0.01%) :arrow_up:
glom/test/test_basic.py 100.00% <100.00%> (ø)
glom/test/test_match.py 100.00% <100.00%> (ø)
glom/test/test_mutation.py 97.94% <100.00%> (ø)
glom/test/test_scope_vars.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c766119...616ac19. Read the comment docs.

mahmoud commented 4 years ago

Items discussed are done. There's the small issue of this being documented, but I'm willing to defer documenting to gather usage feel and let it bake. And of course expedite v20.7.0

mahmoud commented 4 years ago

Talked about it, will make the docs changes.