[issue36741] Variable about function and list

2019-04-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: No problem, closing this as not a bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior ___ Python tracker _

[issue36741] Variable about function and list

2019-04-27 Thread 張晨韜
張晨韜 added the comment: Sorry. This is my first time to use this.Next time I'll notice. Thanks a lot for your fast and patient answer. -- ___ Python tracker ___

[issue36741] Variable about function and list

2019-04-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: You are passing a reference to the list so changes in Flash are made to the actual variable. Using cards.copy() instead of cards passes a copy of the list and hence modifications inside the function won't affect the original list. This is not a bug

[issue36741] Variable about function and list

2019-04-27 Thread 張晨韜
New submission from 張晨韜 : Hello,I'm a Taiwanese student. First,I will say sorry because of my poor English.If I have an offense,please forgive me. Then,look at the picture about program.I declare a list "cards" to the function "Flush",and divide them by 13 in the function.The function Flash wil