Hello fellow soupers,
I would like to store Python data as Tag object attributes (not HTML attributes). For example,
tag.my_cache = {}
tag.my_cache["a"] = 1
tag.my_cache["b"] = 2
It seems like this is okay with the following caveats:
- The attribute name cannot conflict with a name that BS4 uses internally.
- The attribute name would prevent any "convenience child tag" referencing (which I do not use).
- The data is not serialized to HTML.
- The data is not duplicated by copy/clone methods.
Am I missing anything?
- Chris