2034 views|3 replies

12

Posts

0

Resources
The OP
 

How to implement deepcopy of MicroPython [Copy link]

 

Dear masters,

Please tell me how to implement deepcopy in python in micropython.

Latest reply

It's because of the use of multi-level lists. This is a feature of the Python language. There is no simple way to do it. The best way is to be diligent and troublesome when creating and using lists.   Details Published on 2020-6-23 16:23
 
 

1w

Posts

25

Resources
2
 

Currently MicroPython does not provide this function and needs to be implemented by yourself.

 
 
 

12

Posts

0

Resources
3
 
dcexpert posted on 2020-6-23 16:05 Currently micropython does not provide this function, you need to program it yourself.

When I used list append, I found that some data were linked. I guess they were pointing to the same address. Is there any good way to solve this problem?

Comments

It's because of the use of multi-level lists. This is a feature of the Python language. There is no simple way to do it. The best way is to be diligent and troublesome when creating and using lists.  Details Published on 2020-6-23 16:23
 
 
 

1w

Posts

25

Resources
4
 
hxp2 posted on 2020-6-23 16:07 When I used list append, I found that some data was linked. I guess they pointed to the same address. Is there any good way?

It's because of the use of multi-level lists. This is a feature of the Python language. There is no simple way to do it. The best way is to be diligent and troublesome when creating and using lists.

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list