Re: delItem_
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Serge Orlov wrote: > Mark Hahn wrote: >>> It is also not clear how to use .delItem_()? Should I always make >>> a Slice object for it? If so, how do I make a Slice? > >> There is no Slice contructor at the moment. I will add that to the >> to-do list. > >> delItem_() was meant for internal use. > >> replace > >> Main.attrs_.delItem_($q) > >> with > >> del Main.q > > What if I have a list of symbols to delete? I thought that > "del something" is always compiled as calling delItem_() on > the appropriate object. > Main.z = Main.q > is equal to > Main.attrs_[$z] = Main.attrs_[$q] > which is equal to > Main.attrs_.setItem_($z) = Main.attrs_.getItem_($q) > > Am I right or wrong? I don't know what Python does. In any case I just put supporting a single non-slice object as an argument for getItem_, set_item_, and del_item_ on the to-do list.