Skip to content

Choose a tag to compare

@CoCo-R38 CoCo-R38 released this 25 Mar 19:48
0fa4b5b

2.3 Update (Type Registry + Optional Type)

2.2 was just an internal version for testing that was never published!

In this update, the Type Registry has a lot of issues fixed, while making it easier to use. Read README for more information on the usage.

Also the Optional[T] type is now natively supported and default for RDM files. Means if you store union types like str | NoneType it will be automatically saved as Optional[str]. But don't worry, inside the code it will still be handled as a normal union type for compatibility. Only the RDM file will display it as an Optional[T] type.

Also you can use Optional as a type like any other:

import rheelDM
from typing import Optional

data = rheelDM.Obj()
data.section("user").set("display_name", Optional[str], None)
# IS THE SAME AS
data.section("user").set("display_name", str | None, None)