--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/brython/CAF1%3DpDmME3KTmwqeP7OUHUuU59kWCuxkTqDmLODwbXTTipz1pg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/brython/CAFr00W5%3DrmiiPopw3nddz%3D7d1pReTxdeX-c%3DGtHQJu%2BaGPG%3DLQ%40mail.gmail.com.
Two issues I recently ran into while developing brython apps:1. When loading multiple scripts, an error in one means later scripts never execute.This is not ideal when loading multiple independent modules on the page (one to display user data, one to handle form submissions / data validation, one to update data display, etc).Is it possible to have interpreter wrap each module loaded with <script src=foo.py> in a try/except block, so failures don't block other modules on page from loading? modules included in another module with "import", sure, cascading errors and stopping interpreter makes sense. separate scripts are a different matter.Wrapping each module myself in a giant try/except is not ideal. Makes top-level functions look like methods by virtue of indentation. Not to mention violation of DRY principle. Doing it once at interpreter level - at least as a config option - would help.
2. cpython supports -tt option to forbid code with mixed leading spaces & tabs. can brython support the same option for parsing modules? I do my best to keep code consistent, but sometimes rogue edits introduce invisible spaces where they don't belong. running such code in brython produces useless errors like "invalid syntax" at a line far away from the real problem, because invisible spaces changed indentation levels.if you're striving for max compatibility with brython spec, -tt seems like a useful option to include.
"The former -tt startup option to raise TabError on ambiguous mixtures of tabs and spaces for indentation has been removed as an option and is now the standard behavior."see issue tracker and github thread
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/brython/968515a2-9b66-4e62-8d33-8f442d117f87n%40googlegroups.com.