Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > tuples within tuples

Reply
Thread Tools

tuples within tuples

 
 
Stargaming
Guest
Posts: n/a
 
      10-26-2007
On Fri, 26 Oct 2007 14:26:24 -0600, Michael L Torrie wrote:

> http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

[snip]
>>>> ('tagA', None, [('tagB', None, ['bobloblaw], None)], None)

^
Syntax error behind ``'bobloblaw``.

>>> "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 element is
>>> a list containing a non-terminated string -- so the entire structure
>>> is invalid)
>>>
>>>

>> i'm not sure what u mean with "the entire structure is invalid"...
>> that's exactly what I got while parsing...

>
> Your structure is correct. Dennis just didn't read all the matching
> parens and brackets properly.


He certainly is -- *you* are misreading *him*. The nit he's picking is
the non-terminated string (quotation mark/apostrophe missing).

Nit-picking'ly,
Stargaming
 
Reply With Quote
 
 
 
 
korovev76@gmail.com
Guest
Posts: n/a
 
      10-27-2007
On 26 Ott, 23:33, Stargaming <(E-Mail Removed)> 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 found out that sometimes pyrxp parses the newline too...
By now I guess it's not its fault, but it's becuase of the way the xml
file is written




 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      10-27-2007
On Fri, 26 Oct 2007 12:58:39 -0700, (E-Mail Removed) declaimed the
following in comp.lang.python:

>
> i'm not sure what u mean with "the entire structure is invalid"...
> that's exactly what I got while parsing...
>


>>> data = ('tagA', None, [('tagB', None, ['bobloblaw], None)], None)

Traceback ( File "<interactive input>", line 1
data = ('tagA', None, [('tagB', None, ['bobloblaw], None)], None)
^
SyntaxError: EOL while scanning single-quoted string
>>>

--
Wulfraed Dennis Lee Bieber KD6MOG
(E-Mail Removed) (E-Mail Removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (E-Mail Removed))
HTTP://www.bestiaria.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggested feature: slice syntax within tuples (or even more generally)? stephenwlin@gmail.com Python 19 02-26-2013 07:38 AM
Dictionaries with tuples or tuples of tuples Jon Reyes Python 18 02-19-2013 03:56 AM
Passing tuples of tuples to sqlite xera121 Python 8 09-30-2009 05:45 AM
Re: Lists of lists and tuples, and finding things within them Daniel Nogradi Python 3 11-10-2006 07:57 AM
Different tuples to one container? (One type of a pointer to point to different kinds of tuples?) fff_afafaf@yahoo.com C++ 5 10-05-2006 11:17 PM



Advertisments