It appears that both a BasicDataset and a PyDataSet can be assigned to a custom property of type ‘Dataset’. Regardless of which type is assigned, reading this custom property always returns a BasicDataset.
Similarly, the toDataSet() expression function is able to cast a PyDataSet to a BasicDataset.
How is this conversion implemented? If I wanted to create my own dataset wrapper class, how can I make it so that my class can also be implicitly converted to a BasicDataset when required?