[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed with Stefan about this not being appropriate for the bug tracker. And I'm saying that I don't agree with you. There's no bug here. -- ___ Python tracker

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Stefan Behnel
Stefan Behnel added the comment: You misunderstood what the code is doing, and the response that you got indicates that the bug tracker is not the right place to discuss this misunderstanding. If you want to discuss this further, please ask on the Python mailing list

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Varada
Varada added the comment: Hi, Eric & Zach, Thanks for your kind response. @Eric, from your comments am I to understand that you agree with me or state that my understanding is wrong ? :) I couldn't conclude it. The point where I find difficult to convince myself is why am I not able to

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: To elaborate on Zach's comment: Notice that your first example repeats 0 19 times. The second example repeats nothing 19 times. If you first example returned a list with [0] repeated 19 (that is: [[0], [0], [0], ..., [0]]), then you're correct the second

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Zachary Ware
Zachary Ware added the comment: Nothing (or 0, or an empty list, string or tuple, etc.) multiplied by any positive whole number is still nothing. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Zachary Ware
Change by Zachary Ware : -- components: -Windows ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Varada
New submission from Varada : Hi, As per my understanding, a = [0]*19 -> creates a list of length 19 with all zeros, >>> a = [0]*19 >>> print (len(a)) 19 >>> a [18] = 2 >>> print (a) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2] >>> In the similar way, >>> a = []*19 --> Must