{Union; Optional} = pyimport "typing" {DateTime;} = pyimport "datetime" dt = DateTime print! dt.max print! dt.today!() print! dt 2022, 8, 10 ul = pyimport "urllib" _ = ul.error.__dict__ error = pyimport "urllib/error" _ = error.__dict__ shutil = pyimport "shutil" usage = shutil.disk_usage! "tests/should_ok/pyimport.er" assert usage.total == usage[0] for! usage, i => print! i op = pyimport "operator" getter = op.itemgetter(1, 2) assert getter([1, 2, 3]) == [2, 3] real_getter = op.attrgetter("real") _ = real_getter(1) # OK ab_getter = op.itemgetter("a", "b") assert ab_getter({"a": 1, "b": 2}) == [1, 2] ip = pyimport "ipaddress" a = ip.IPv4Address "192.168.0.0" _ = a == a _ = a <= a _ = a + 1 + 1