OpenTimelineIO icon indicating copy to clipboard operation
OpenTimelineIO copied to clipboard

Allow to construct AnyVector and AnyDictionary with values from Python

Open JeanChristopheMorinPerso opened this issue 2 years ago • 5 comments

Allow to construct AnyVector and AnyDictionary with values from Python.

Note that it only useful to OTIO developers who have to play with the Python bindings internals. For example I often have to create these objects when I work on the bindings, and it's quite annoying to have to do

import opentimelineio as otio
d = otio._otio.AnyDictionary()
d['a'] = 'a'

while I could simply do d = otio._otio.AnyDictionary({'a': 'a'}).

This was extracted from https://github.com/AcademySoftwareFoundation/OpenTimelineIO/pull/1490.