On Wed, 12 Oct 2022 at 05:23, Thomas Passin <li...@tompassin.net> wrote: > > On 10/11/2022 3:10 AM, avi.e.gr...@gmail.com wrote: > > I see resemblances to something like how a web page is loaded and operated. > > I mean very different but at some level not so much. > > > > I mean a typical web page is read in as HTML with various keyword regions > > expected such as <BODY> ... </BODY> or <DIV ...> ... </DIV> with things > > often cleanly nested in others. The browser makes nodes galore in some kind > > of tree format with an assortment of objects whose attributes or methods > > represent aspects of what it sees. The resulting treelike structure has > > names like DOM. > > To bring things back to the context of the original post, actual web > browsers are extremely tolerant of HTML syntax errors (including > incorrect nesting of tags) in the documents they receive. They usually > recover silently from errors and are able to display the rest of the > page. Usually they manage this correctly.
Having had to debug tiny errors in HTML pages that resulted in extremely weird behaviour, I'm not sure that I agree that they usually manage correctly. Fundamentally, they guess, and guesswork is never reliable. ChrisA -- https://mail.python.org/mailman/listinfo/python-list