[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers

New submission from nathan rogers :

https://repl.it/repls/ColorfulFlusteredPercent

Here you can see the unexpected behavior I was speaking of. This behavior is 
NOT useful compared to the expected behavior. If I reference position 0 in the 
array, I expect position 0 to be appended. The sensible behavior, from my view, 
would be to make n unique values, not n duplicates.

--
messages: 317572
nosy: nanthil
priority: normal
severity: normal
status: open
title: Unexpected behavior with * and arrays
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue33636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers

nathan rogers  added the comment:

Can anyone give me a legitimate answer as to why this would be expected 
behavior? When at any point would you ever need that? 

If the list is local, you already have the thing. If it isn't local, you can 
pass it to a function by reference. So then, why would you ever need N 
references to the same thing?

Are you going to run out? 

Are your functions buying tickets to the reference of my thing show, and you're 
afraid those tickets will run out?

What is this?

--

___
Python tracker 
<https://bugs.python.org/issue33636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers

nathan rogers  added the comment:

[[], [], [], [], []] 

How is it expected behavior  in python, that

when I update position 0, 

it decides to update positions 1-infinity as well?

That is nonsense, and there is not a use case for this behavior. If you have 
already created the value, you have the value locally, and don't need 
N-REFERENCES to that thing. When calling functions as well, there will never be 
a time when you need more than 1 reference to the thing. 

How is this useful, and in what context could this ever be intuitive? If this 
is not a bug, it countermands the zen of python on almost every alternate line.

--
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue33636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com