[reportlab-users] Re: The upcoming Reportlab 1.18 release and patches.

Robin Becker reportlab-users@reportlab.com
Wed, 9 Jul 2003 00:25:46 +0100


In article <hggpfUA+00C$EwTS@jessikat.fsnet.co.uk>, Robin Becker <robin@reportlab.com> writes
.......
>I must be pretty stupid then, I need an example or tell me which of the returns 
>
>I see these in parsexml0
>
>
>177:                return (NameString, AttDict, ContentList, ExtraStuff)
>214:            return (None, endcomment+1) # shortcut exit
>373:    return (t, cursor)
>
>so I see one 4 and two 2 element returns. Now although that looks pretty 
>obviously
>wrong I also see that we have a recursive call to parsexml0 which expects a two 
>element
>return so I believe the problem is slightly more complex than you seem to imply.
>
>Of course if you know the answer couldn't you just say what it is?
Looking more deeply it seems that two elements is the intention for parsexml0
although I'm not exactly sure of the reasoning behind that. Aaron's stuff can
be pretty deep sometimes so I believe that the non-standard return is in fact
the one at 177

which should be something like
 
      return (NameString, AttDict, ContentList, ExtraStuff), len(xmltext)

that way we always give two elements back as expected externally and in the
recursive call. I'm not exactly sure of the cursor position required at 177
as I see that xmltext has been stripped, but this appears to be a toplevel
call return so it shouldn't matter. I think the cursor return is only of use
in the recursive call (which is in a loop). Does this seem reasonable?
-- 
Robin Becker