cdgriffith / Box

Python dictionaries with advanced dot notation access
https://github.com/cdgriffith/Box/wiki
MIT License
2.64k stars 107 forks source link

Add property support for Box #239

Closed Serge45 closed 1 year ago

Serge45 commented 1 year ago

As requested to issue #211, this PR makes adding property with getter, setter and deleter to Box possible.

The idea is to check if the field is a property (a private function _get_property_func was added for this), if so, for setter, getter or deleter, box will route to the customized function if exists else the original implementation.