simphony / simphony-common

The native implementation of the Simphony cuds objects
BSD 2-Clause "Simplified" License
7 stars 5 forks source link

RestrictedDataContainer needed? #333

Closed stefanoborini closed 7 years ago

stefanoborini commented 7 years ago

So, there's a function in data_container, called create_data_container. It actually creates a new class derived from DataContainer, with defined restricted keys. I am unsure of the logic behind it, but to me it seems redundant and pointless. What this function should eventually do is to instantiate an (empty) DataContainer with the proper restricted keys as specified.

kitchoi commented 7 years ago

It is no longer used and is made redundant. Instead I think we can add a class method to DataContainer that instantiate a DataContainer with the restricted keys.

stefanoborini commented 7 years ago

Ok, thanks. The conclusion is that I will remove the method, and put a classmethod constructor to set specific restricted keys at creation.

kitchoi commented 7 years ago

SGTM. Thanks.

mehdisadeghi commented 7 years ago

Done in #334