Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > At Thursday 7/12/2006 16:46, Roy Smith wrote: > >>I see your point. Actually, I think you want to force the sequences to be >>lists (regardless of what syntax we end up with), on the theory that tuples >>are for heterogeneous sequences and lists

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Gabriel Genellina
At Thursday 7/12/2006 16:46, Roy Smith wrote: I see your point. Actually, I think you want to force the sequences to be lists (regardless of what syntax we end up with), on the theory that tuples are for heterogeneous sequences and lists are for homogeneous ones. Any rationale for this theory

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread MRAB
John Machin wrote: > Roy Smith wrote: > > > It would be nice if struct.unpack() had a way to specify unpacking repeated > > items as a list, ie: > > > >data = struct.unpack ("! H 4(B) H 2B 12(B) 6(B) H I", strMessage) > >(top, > > ip, > > messageCounter, > > ackRequired, > >

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > "John Machin" <[EMAIL PROTECTED]> wrote: > > > Roy Smith wrote: > > > > > It would be nice if struct.unpack() had a way to specify unpacking > > > repeated > > > items as a list, ie: > > > > > >data = struct.unpack ("! H 4(B) H 2B 12(B) 6(

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "John Machin" <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: > > > It would be nice if struct.unpack() had a way to specify unpacking repeated > > items as a list, ie: > > > >data = struct.unpack ("! H 4(B) H 2B 12(B) 6(B) H I", strMessage) > >(top, > >

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Roy Smith wrote: > It would be nice if struct.unpack() had a way to specify unpacking repeated > items as a list, ie: > >data = struct.unpack ("! H 4(B) H 2B 12(B) 6(B) H I", strMessage) >(top, > ip, > messageCounter, > ackRequired, > dataType, > utc, > st, > n

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Michael Yanowitz wrote: > > > What would be the best way to split the following line (Python doesn't like > > me to split it up between the comma-separated parameters): > > > >top, ip1, ip2, ip3, ip4, messageCounter

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Fredrik Lundh wrote: > Michael Yanowitz wrote: > > > What would be the best way to split the following line (Python doesn't like > > me to split it up between the comma-separated parameters): > > > >top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, > > utc2, utc3, utc4, utc5

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Roth
Fredrik Lundh wrote: > Michael Yanowitz wrote: > > > What would be the best way to split the following line (Python doesn't like > > me to split it up between the comma-separated parameters): > > > >top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, > > utc2, utc3, utc4, utc

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Fredrik Lundh
Michael Yanowitz wrote: > What would be the best way to split the following line (Python doesn't like > me to split it up between the comma-separated parameters): > >top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, > utc2, utc3, utc4, utc5, utc6, utc7, utc8, utc9, utc10, u