From: Norbert N. <No...@ne...> - 2005-01-26 14:43:26
|
Am Mittwoch, 26. Januar 2005 10:52 schrieb Ivan Vilata i Balaguer: > Having said that, I keep the opinion that node creation, removal and > renaming should belong in Group methods and nowhere else. Bye! For renaming and removal, I agree with you. For creation however, I don't. Making node creation a group method makes the whole system non-extensible. The Group class has to contain a createSomething method for every kind of Node that it might contain. Currently, we already have Array, EArray, Table, Group and VLArray. In the long run, the number of possible Nodes will probably increase even more. Actually, it would make sense to allow the user to define their own kinds of Nodes to extend PyTables. Putting all these methods into Group is not extensible. The Group should offer everything that concerns groups, but it should not need to know what kinds of Nodes might exist. Now, we could either demand a factory function for each kind of Nodes, but that would just mean one additional function where the same functionality can simply be placed in the constructor. -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <No...@Ne...> |