Commit 03cef16
committed
Always create a new copy of the function table
When defining a subclass of ``Functions``, the
``getattr()`` call would retrieve the base classes function
table, mutate the table, and then assign a reference of that
table to the child class. We want to allow each subclass
to have its own separate copy of the function table so its
created from scratch each time.
I think there's room for optimization here. We could
copy the parent func table if it exists and iterate through
the ``attrs``, which will only contain the functions defined
in the actual class.
Fixes #133.1 parent 71f4485 commit 03cef16
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
0 commit comments