holger krekel wrote: > [...] > you probably missed my other posting where i actually went > one step further and implemented this via <...> syntax. I saw it. I actually took a look at your IEXEC patch, where this XML stuff is one of your use cases. Compared to the patch, which uses sys._getframe(1).f_locals['__icontent__'] to get at the content nodes I like the __catch__ idea much better. But I find your syntax to be too unpythonic. > Actually i tried *exactly* the syntax you propose here first but > i think it's *hopelessly* ambigous with the Python grammar. > > You simple have no way to know which construct you are in > until you read the ':'. Until then you could be in a > normal expression. The 'class', 'def', 'if', 'while' etc. > keywords disambiguate this right at the beginning. > > Without a much deeper parser look-ahead this can't > be done, i am afraid. You're right, but my point is that in this XML case the new block feature is used so often that an additional keyword might be too much typing overhead. Bye, Walter Dörwald
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4