Download Latest Version 3.7.11 London.zip (14.3 MB)
Email in envelope

Get an email when there's a new version of Transcrypt

Home / 3.7.1_alpha_2
Name Modified Size InfoDownloads / Week
Parent folder
ES6 modules and PY3.7 dataclasses, REQUIRES PYTHON 3.7.tar.gz 2018-04-18 14.1 MB
ES6 modules and PY3.7 dataclasses, REQUIRES PYTHON 3.7.zip 2018-04-18 14.3 MB
README.md 2018-04-18 1.6 kB
Totals: 3 Items   28.5 MB 0

Most functionality of the production release is present. Some minor changes are to be expected to achieve better interop with webpack. All local tests pass. N.B. This release requires Python 3.7.0b3 or higher. Following code now functions correctly:

from dataclasses import dataclass
from typing import ClassVar

@dataclass (order = True)
class C:
    x: ClassVar = 10
    y: int = 20
    yy: int = 22
    z: int = 30
    zz: int = 33
    t: ClassVar = 40

    def f (self, p, autoTester):
        self.a = p
        self.b = 2000
        autoTester.check (self.x, self.y, self.a)
        return f'something(a: {self.a}, b: {self.b})'

def run (autoTester):
    c = C (y = 200, zz = 330)
    cc = C (y = 10200)
    c.f (123, autoTester)
    c.t = 400
    cc.f (456, autoTester)
    cc.t = 4000

    for obj in c, cc:
        autoTester.check (obj.x, obj.y, obj.yy, obj.z, obj.zz, obj.t, obj.a, obj.b)

    autoTester.check (c.__repr__ ())
    autoTester.check (cc.__repr__ ())

    #__pragma__ ('opov')

    autoTester.check (c == cc)
    autoTester.check (c != cc)

    autoTester.check (c < cc)
    autoTester.check (c > cc)  #
    autoTester.check (c <= cc) #
    autoTester.check (c >= cc)

    autoTester.check (c == c)
    autoTester.check (c != c)
    autoTester.check (c < c)
    autoTester.check (c > c)
    autoTester.check (c <= c)
    autoTester.check (c >= c)
Source: README.md, updated 2018-04-18