Keyword Args & Immutability

Using Python's keyword args and immutability with Transcrypt.

We'll cover the following

Keyword arguments

By default, unpacking keyword arguments with **kwargs in a function does not work out of the box in Transcrypt. This is because it would lead to bloated code when it gets transpiled to JavaScript. Fortunately, Transcrypt provides us with a compiler directive that will selectively enable that feature for just when it’s needed. Here is a simple example:

Get hands-on with 1200+ tech skills courses.