in update_in(), option to disable upsert

Open
#515 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start by locating the update_in() implementation and its existing tests, then read how missing keys and default values are handled. Done means an opt-out behavior is defined for upsert and covered by tests showing that a missing key remains absent without requiring a default value.

Written by the indexing model from the issue text.

Description

I'm doing an update that is completely meaningless when the key doesn't already exist. I don't even want to use a default value. I just want to leave the key nonexistent. I know I can first see if get_in() is not None, but an option to disable upsert seems too natural to not have in an update function.

Dominant language
Python
Stars
5.2k
Forks
280
Avg merge
6d 17h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pytoolz/toolz

All issues in pytoolz/toolz

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.