Skip to content

Draft: Protective struct

Lee McCuller requested to merge lee-mcculler/pygwinc:protective_struct into master

Adds the ability to set access restrictions on Struct values. Either only allow assigning to existing keys or to disallow assignment altogether.

Requires the upgrades in inheritance so that dictionary/yaml inputs are fully and deeply mapped into structs. Uses a specialized walk to access sub-structs and set their permissions.

This code doesn't appear to break anything, but I haven't yet actually tested the protections.

Merge request reports