Transcrypt
Transcrypt copied to clipboard
Python 3.9 to JavaScript compiler - Lean, fast, open! -
I was surprised that getattr() function does not allow third default argument, which is critically important basic functionality as JavaScript does not raise AttributeErrors when accessing missing attributes and we...
Exceptions raised in the `else` block should bubble out, but instead they currently get suppressed. This: ```python try: pass except: pass else: raise Exception('something wrong happened in the `else`') ```...
`self.pages = tuple (Page (self, pageIndex) for pageIndex, Page in enumerate (self.Pages)])` doesn't seem to work. Workaround: Use a list comprehension in this case.
Please transcrypt the following code: ```python class Context: def __enter__(self): print("enter") def __exit__(self, exc_type, exc_val, exc_tb): print("exit") return False def main(): with Context(): print("exit is not called") return document.addEventListener('DOMContentLoaded', main)...
This is a little bit of a patch (hack) I apply to allow the use of the descriptor protocol (or, most of it). Descriptors are really useful for reactive UI...
I couldn't find any information on this, but is the Descriptor Protocol supported. Or is there some way to archive something like this?
Added `time.monotonic` as suggested in #699 - it is a trivial one-line implementation based on `performance.now`. The docstring is a simplified version of the official Python documentation.
Hello, if I am correct you cannot use Transcrypt generated JS files embedded in a local html file by directly opening this file in a local browser as javascript modules...
Transcrypt runs without error and produces output when ran over addict.py (a library on top of Dict, that uses some python dunder function hooks to make dictionary operations via class/object...
I see several PRs open for 2 years. Is this no longer maintained? Is it accepting PRs? The readme and GitHub release don’t have the latest version from Pypi either,...