On Wed, Apr 26, 2000 at 08:55:42PM +0100, John Holdsworth wrote: > > > > > Included is a bug fix to the decode of unpack 'N/Z*' which > > > > > was not adding a byte to the encoded length as pack does. DB<1> x pack "N/Z* a4", "hi there ", "1234"; 0 "\c@\c@\c@\cIhi there \c@1234" DB<2> x chr 9 0 "\cI" DB<3> x length "hi there " 0 9 This is clearly a bug. Either \0 should not have been inserted, or (better) the length should have been marked as 10. But this is a bug in pack(). I do not see why any change should be done to unpack(). > > I can easily believe that the feature you wanted to add is desirable, > > but until we can invent a more intuitive and more general "API". I do > > not think that what you did should go in. > > No problem, how it is represented in the template is going to > require more discussion. I am mainly putting forward the idea. I do not care which letter represents "it" in the template. I care that "it" which you implemented looks ad hoc and may not generalize to other useful situations. IlyaThread Previous