Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'converts': 0.07; 'parsing': 0.07; 'string;': 0.07; 'strings.': 0.07; 'api': 0.09; '22,': 0.09; 'expectation': 0.09; 'literal': 0.09; 'objects.': 0.09; 'parsed': 0.09; 'dec': 0.15; 'sat,': 0.15; 'element,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'element': 0.17; 'integer': 0.17; 'string,': 0.17; 'code.': 0.20; 'followed': 0.20; 'doc': 0.22; 'seems': 0.23; 'header:In-Reply- To:1': 0.25; 'am,': 0.27; '(as': 0.27; 'object,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'bold': 0.29; 'document,': 0.29; 'dom': 0.29; 'node': 0.29; 'gets': 0.32; 'structure': 0.32; 'getting': 0.33; 'right?': 0.33; 'text,': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'adds': 0.35; 'text.': 0.35; 'expected': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'add': 0.36; 'but': 0.36; 'characters': 0.36; 'child': 0.36; 'should': 0.36; 'does': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'tags,': 0.81; '(is': 0.84; 'float,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=I95CMBE1KUqmY4tNP1X1eV9Dn8toZwkDXClLtzpKJNw=; b=hHhSfFESEjPDpAnrM2aqDGWo1LuPw7QSy9Sh/UQr0ABynNfVM1mAnq1Q1tc8l+Yv85 Dz6YLwKwaN8KCSA1Vh17ichXDTDJr6ttpQlHo5DGKVTot8l0grlHKmZ1iPju91wmNOEU XBJX241KBvb/jrDDKrfsXIWjKQwp0qdK+B3mSoTngYotpOdXlw1+RiyKhPqZ3Eu3i+NR MhzswPJBmKXegwYbqzOtZBVzizF8EDVo2HtaT1QCmIrnLDqoCmSQiVZvxTJV5VqCnuVj b/HhlVEGNLzSo1Uyhq6DSFSNs5SSQX3YwD+2VEhj2aAuj1sQX2oBy3hrP/7OIvVbqsJD Mlew== MIME-Version: 1.0 In-Reply-To: <4ddee631-b5b5-4cb4-82b0-00ca403b773e@googlegroups.com> References: <50D256B3.4070709@udel.edu> <96edb672-dabd-4ab8-9e7c-3fa7f4a91437@googlegroups.com> <44335f22-555a-4806-b24a-7d4cb1d8e529@googlegroups.com> <4ddee631-b5b5-4cb4-82b0-00ca403b773e@googlegroups.com> Date: Sat, 22 Dec 2012 09:52:49 +1100 Subject: Re: Brython - Python in the browser From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356130372 news.xs4all.nl 6865 [2001:888:2000:d::a6]:34467 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35325 On Sat, Dec 22, 2012 at 3:36 AM, Pierre Quentel wrote: > >> Hmm. So when that gets added into a DIV, it has to get parsed for >> tags? How does this work? This seems very odd. I would have expected >> it to remain as DOM objects. > > In DIV(child) : > - if child is a string, integer or float, a text node is added (addChild) to the DIV element, with the string value of child > - if child is another DOM element (as in DIV(B('foo'))) then this element is added to the DIV element Meaning that: doc <=

' will add literal text, not a paragraph object, right? That's definitely what I would expect. > doc <= 'blah blah x > It will add a text node to the document, with the string 'blah blah x