[issue41827] 2D array issue

2020-09-22 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Serhiy. That's a better section than I found. I'm going to close this. @jeetshahj12375: If you can show that this is a bug in python, please re-open this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue41827] 2D array issue

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list. -- nosy: +serhiy.storchaka status: pending -> open ___ Python tracker

[issue41827] 2D array issue

2020-09-22 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41827] 2D array issue

2020-09-21 Thread Eric V. Smith
Eric V. Smith added the comment: Your example is too complex to work through in my head, but I suspect this is the issue you're seeing: https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x In any event, this is almost certainly not a bug in Python, but

[issue41827] 2D array issue

2020-09-21 Thread jeet shah
jeet shah added the comment: after = [[1,2],[3,4]] rows, cols = (len(after), len(after[0])) before = [[0]*cols]*rows # before = [[0 for i in range(cols)] for j in range(rows)] #uncomment this array definition and comment above one... see difference in output. print(before) def

[issue41827] 2D array issue

2020-09-21 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide the output you see and the output you expect. And it would be better if you could just post the code into the comment window. I, for one, cannot run your .ipynb file. -- nosy: +eric.smith ___ Python

[issue41827] 2D array issue

2020-09-21 Thread jeet shah
New submission from jeet shah : See difference in output by changing array definition. -- files: matrix summation-Copy1.ipynb messages: 377268 nosy: jeetshahj12375 priority: normal severity: normal status: open title: 2D array issue type: behavior versions: Python 3.10 Added file: