PFython / cleverdict

A JSON-friendly data structure which allows both object attributes and dictionary keys and values to be used simultaneously and interchangeably.
MIT License
102 stars 9 forks source link

Pass value to custom delete function #19

Open PFython opened 3 years ago

PFython commented 3 years ago

.delete() currently just takes a key/attribute name argument which means the actual value will be deleted before any custom delete function is called. It may be important to have that value available (e.g. backup?)

Alternatively ensure custom delete (and save) are called BEFORE delitem etc.

PFython commented 3 years ago

Labelled as "wontfix" after Version 1.8.0 simply because the main authors don't currently have the time for non essential enhancements. If there's a huge uptake in people using CleverDict and asking for this feature that may change, or if you're reading this why not Fork, develop a solution, and contribute a Pull Request yourself?