Commit a66b84a
Reify object from base type
The currect assumption that `object` can be used to create a new object
is not always valid. One example is the issue I'm currently facing:
```
>>> reify(ast.Num(n=var('x')), {var('x'): 123})
...
55 def _reify_object_dict(o, s):
---> 56 obj = object.__new__(type(o))
57
58 d = yield _reify(o.__dict__, s)
TypeError: object.__new__(Num) is not safe, use Num.__new__()
```1 parent f25b20d commit a66b84a
2 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
0 commit comments