Re: Packet definition variable length list on output
"Roger Binns" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <002701c5bff9$b8e98200$3501a8c0@rogersqyvr14d3> |
> The '++' modifier indicates that the attributes of this field can be set. Internally, this would generate a method called
> 'set_number_attr(**kwargs)'. Then later in users code:
>
> some_obj.set_number_attr(terminator=None) # turn off terminator
You can already do this although only by creating a new instance. If the .p
has
* CSVSTRING {'quotechar': None, 'default': ""} +number
Then you can do this:
foo.number=CSVSTRING('terminator': 'X')
This is a quite yucky though but safer. This will also work:
foo.number._update('terminator': 'X')
Another option to have some sort of EOL type. On writing we could make it remove any preceding
comma.
Originally was thinking about automatically giving each item some knowledge about
where it is in the sequence. There is probably some elegant way of doing this.
Roger
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php