In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> wrote: . . . >Er? Thanks for the nice comments re: pyparsing, sometimes I feel a little >self-conscious always posting these pyparsing snippets. So I'm glad you >clarified your intent with your "I'll be more precise" paragraph. But I'm >not sure I see the reason for an 18-O "No!" > >"Outsider"? I'm no stranger to Tcl (although I *am* a bit rusty). In the . . . >- write a Tcl proc to recursively traverse a list, returning a stringified >list in Python-like syntax (enclosing non-list items in ''s, separating with >commas, nesting sublists with []'s, etc.) . . . I like your work, Paul. My comment about "outsider" was aimed at other readers of this thread, not you; I recognize I didn't make that clear.
I'm still unsure how the original poster wants to handle nested lists. I'm almost certain, though, that it's hard to teach Tcl Python syntax (and vice-versa) for general cases. On the other hand, as you write in a paragraph I elided, the original questioner might be indifferent to all the esoterica we're imagining. Elsewhere in this thread, I posted what I claim is a complete solution (for *some* problem--again, I remain unsure exactly what the target is). I trust your judgment on its readability compared to your pyparsing-based example. Keep posting those examples! I think pyparsing deserves plenty more marketing of exactly this type. I don't have an installation of pyparsing handy. If this topic interests folks, I should have another machine or two repaired early this week, and I can more carefully trace through the pathologies to which pyparsing of Tcl might be subject. -- http://mail.python.org/mailman/listinfo/python-list