denosaurs / denosaurs/deno_python

errors when setting properties on a class that extends python class

Open
#54 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
762
Forks
26
PR merge metrics
No merged PRs in 30d

Description

```ts
import { python } from "https://deno.land/x/python@0.4.1/mod.ts";

const gi = python.import("gi");
gi.require_version("Gtk", "4.0");
const Gtk = python.import("gi.repository.Gtk");

class MainWindow extends Gtk.ApplicationWindow {
constructor() {
super();
this.a = 4; // error here
}
}
console.log(new MainWindow());
```

```
error: Uncaught TypeError: 'set' on proxy: trap returned falsish for property 'a'
this.a = 4;
^
at new MainWindow (file:///home/mrcool/dev/deno/lab/b.ts:10:11)
at file:///home/mrcool/dev/deno/lab/b.ts:14:13
```

more info here https://github.com/denosaurs/deno_python/issues/53#issuecomment-1797864483

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.