Re: tuples within tuples

2007-10-27 Thread J. Cliff Dyer
J. Clifford Dyer wrote: > On Fri, Oct 26, 2007 at 06:59:51AM -0700, [EMAIL PROTECTED] wrote regarding > Re: tuples within tuples: > >>> Resolve *what*? The problem isn't clear yet; at least to me. Above you >>> say what you get. What exact

Re: tuples within tuples

2007-10-26 Thread korovev76
On 26 Ott, 23:33, Stargaming <[EMAIL PROTECTED]> wrote: > He certainly is -- *you* are misreading *him*. The nit he's picking is > the non-terminated string (quotation mark/apostrophe missing). > right, now i got it! beside this, i'm trying to use the reduceXML function proposed by Larry.. but I

Re: tuples within tuples

2007-10-26 Thread Stargaming
On Fri, 26 Oct 2007 14:26:24 -0600, Michael L Torrie wrote: > [EMAIL PROTECTED] wrote: [snip] ('tagA', None, [('tagB', None, ['bobloblaw], None)], None) ^ Syntax error behind ``'bobloblaw``. >>> "C" isn't a tuple in your example either.

Re: tuples within tuples

2007-10-26 Thread Michael L Torrie
[EMAIL PROTECTED] wrote: > On 26 Ott, 19:23, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > (A,B,C,D) >>> that could be >>> ('tagA', None, [('tagB', None, ['bobloblaw], None)], None) >> "C" isn't a tuple in your example either. It is a one-element list >> (the single element INSIDE the

Re: tuples within tuples

2007-10-26 Thread korovev76
On 26 Ott, 19:23, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > (A,B,C,D) > > that could be > > ('tagA', None, [('tagB', None, ['bobloblaw], None)], None) > > "C" isn't a tuple in your example either. It is a one-element list > (the single element INSIDE the list is a tuple whose third

Re: tuples within tuples

2007-10-26 Thread J. Clifford Dyer
On Fri, Oct 26, 2007 at 06:59:51AM -0700, [EMAIL PROTECTED] wrote regarding Re: tuples within tuples: > > > Resolve *what*? The problem isn't clear yet; at least to me. Above you > > say what you get. What exactly do you want? Examples please. > > > > &g

Re: tuples within tuples

2007-10-26 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > > [cut] >> >> Without a better example or explanation of what you are trying to do >> it is difficult > > You're right. > Actually i'm parsing an xml file using pyrxp, which returns something > like this: > (tagName, attributes, list_of_children, spare) > Where list_of

Re: tuples within tuples

2007-10-26 Thread korovev76
> Resolve *what*? The problem isn't clear yet; at least to me. Above you > say what you get. What exactly do you want? Examples please. > Sorry for my poor english, but I meant: how can I obtain a list of A and C starting from something like this? (A,B,C,D) that could be ('tagA', None, [('t

Re: tuples within tuples

2007-10-26 Thread Marc 'BlackJack' Rintsch
On Fri, 26 Oct 2007 05:54:24 -0700, korovev76 wrote: > [cut] >> >> Without a better example or explanation of what you are trying to do it is >> difficult > > You're right. > Actually i'm parsing an xml file using pyrxp, which returns something > like this: > (tagName, attributes, list_of_childre

Re: tuples within tuples

2007-10-26 Thread korovev76
[cut] > > Without a better example or explanation of what you are trying to do it is > difficult You're right. Actually i'm parsing an xml file using pyrxp, which returns something like this: (tagName, attributes, list_of_children, spare) Where list_of_children might "be a list with elements that

Re: tuples within tuples

2007-10-26 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hello everybody. > > I'm wondering how to iterate over a tuple like this > [A,B,C,D] > while saving A and C in a list. > > My problem is that C sometimes is a tuple of the same structure > itself... > > > thanks! > korovev > First of all [A,B,C,D] is a list not a tup

tuples within tuples

2007-10-26 Thread korovev76
Hello everybody. I'm wondering how to iterate over a tuple like this [A,B,C,D] while saving A and C in a list. My problem is that C sometimes is a tuple of the same structure itself... thanks! korovev -- http://mail.python.org/mailman/listinfo/python-list