← index #281Issue #952
Duplicate · high · value 3.137
QUERY · ISSUE

deepcopy function references a non-existant variable

openby dhylandsopened 2018-05-23updated 2019-02-21

In copy.py: https://github.com/micropython/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/copy/copy.py#L163 the deepcopy function references the variable dispatch_table, which isn't initialized.

2 comments
harryofskyrim · 2019-02-21

SO? The issue is still present, and it's really unpleasant

dhylands · 2019-02-21

I just reported this on pfalcon's repository which is the "official" source of this repository.
https://github.com/pfalcon/micropython-lib/issues/26

CANDIDATE · ISSUE

minor typo in deep copy

closedby LokiMetaSmithopened 2024-12-27updated 2025-11-18

I came across this when compiling against copy.py, looking to use the deepcopy function

File "/lib/copy.py", line 194, in deepcopy
NameError: name 'dispatch_table' is not defined

I believe it should be _deepcopy_dispatch

https://github.com/micropython/micropython-lib/blame/e4cf09527bce7569f5db742cf6ae9db68d50c6a9/python-stdlib/copy/copy.py#L96

1 comment
dpgeorge · 2025-11-18

Fixed by 0b78a15fb90d1bbd7637d6500cbbd9b2988a97fe

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied