danielgtaylor / danielgtaylor/python-betterproto

Proposal: ability to detect set/unset fields by client

Open
#101 0 comments 0 reactions 4 assignees Claimed by @cetanu View on GitHub
enhancement low priority medium medium priority
Dominant language
Python
Stars
1.8k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

This idea has been brought up a few times.

Clients want to know whether an object they've created has a certain field explicitly set or not (even when it was set to the default).

This is different from detecting whether the field was set on the wire, since it is not distinguishable whether a default value was set, or that it was omitted.

We would need this feature internally to fix #74, and for #95.

A discussion about this is available on our Slack at `#unset-field-detection`. In due time, the content there should be consolidated here on github.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.