Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added null coalesce operator to path #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added null coalesce operator to path #143

wants to merge 1 commit into from

Conversation

kurtbrose
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jun 2, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@0531ca2). Click here to learn what that means.
The diff coverage is 96.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #143   +/-   ##
=========================================
  Coverage          ?   97.27%           
=========================================
  Files             ?       22           
  Lines             ?     2904           
  Branches          ?      415           
=========================================
  Hits              ?     2825           
  Misses            ?       50           
  Partials          ?       29           
Impacted Files Coverage Δ
glom/core.py 97.40% <92.85%> (ø)
glom/test/test_path_and_t.py 99.21% <100.00%> (ø)
glom/chainmap_backport.py 69.87% <0.00%> (ø)
glom/__main__.py 33.33% <0.00%> (ø)
glom/test/test_basic.py 100.00% <0.00%> (ø)
glom/mutation.py 98.75% <0.00%> (ø)
glom/test/test_reduction.py 100.00% <0.00%> (ø)
glom/test/test_mutation.py 97.94% <0.00%> (ø)
glom/tutorial.py 100.00% <0.00%> (ø)
glom/test/test_streaming.py 100.00% <0.00%> (ø)
... and 14 more

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 0531ca2...92fba74. Read the comment docs.

@mahmoud
Copy link
Owner

mahmoud commented Jun 27, 2020

Stopping by to note that Python's PEP 505 on this got deferred. To me that's notable. Glom has an easy way of getting a default out of a long line of attribute accesses (glom(target, 'a.b.c.d', default=None)). And maybe once in my entire programming career have I ever needed to "get strict again" (i.e., give me a None if b isn't present, but raise an error if there's a b but no c). To me that feels like pattern matching lite (or microlite), and we already have Match coming in! So I think I want to defer this, and leave the Path simple whenever possible. Hope this deferral makes sense to any and all reading this. If we end up having a clear cut use case, you know I'll happily revive it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants