a07d174b57d3be7914fc1ce172c87ea7d487d241,tensorforce/core/utils/nested_dict.py,NestedDict,pop,#NestedDict#Any#Any#,238

Before Change


        raise NotImplementedError

    def pop(self, key, default=None):
        raise NotImplementedError

    def popitem(self):
        raise NotImplementedError

After Change


        if not isinstance(key, str):
            raise TensorforceError.type(name="NestedDict", argument="key", dtype=type(key))

        elif "/" in key:
            key, subkey = key.split("/", 1)
            value = super().__getitem__(key)
            if isinstance(value, self.__class__):
                return value.pop(subkey, default)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: reinforceio/tensorforce
Commit Name: a07d174b57d3be7914fc1ce172c87ea7d487d241
Time: 2020-04-20
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/utils/nested_dict.py
Class Name: NestedDict
Method Name: pop


Project Name: OpenMined/Grid
Commit Name: 78118c0002310cf8a7aa1cb2485182233d5f13c2
Time: 2021-03-31
Author: 12518480+vvmnnnkv@users.noreply.github.com
File Name: apps/domain/src/main/core/model_centric/syft_assets/plan_manager.py
Class Name: PlanManager
Method Name: register


Project Name: lingpy/lingpy
Commit Name: f65356ce7e624cea941a636a1cb2c912e9ecc186
Time: 2012-11-19
Author: mattis.list@gmail.com
File Name: lingpy/data/ipa/sampa.py
Class Name:
Method Name: