[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-10-29 Thread Rafe Kettler
Changes by Rafe Kettler rafe.kett...@gmail.com: -- nosy: +rafe.kettler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-28 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: This is not an appropriate discussion for the bug tracker. Please take it to the Python mailing list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-28 Thread david
david db.pub.m...@gmail.com added the comment: On 28 August 2010 22:34, R. David Murray rep...@bugs.python.org wrote: R. David Murray rdmur...@bitdance.com added the comment: This is not an appropriate discussion for the bug tracker.  Please take it to the Python mailing list. Fair

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-28 Thread david
david db.pub.m...@gmail.com added the comment: On 28 August 2010 22:41, david rep...@bugs.python.org wrote: david db.pub.m...@gmail.com added the comment: On 28 August 2010 22:34, R. David Murray rep...@bugs.python.org wrote: R. David Murray rdmur...@bitdance.com added the comment: This

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
New submission from david db.pub.m...@gmail.com: Python violates most users expectations via the modification differences of immutable and mutable objects in methods. def foo(bar): bar = bar + bar def listy(bar): bar = [1] def dicty(bar): bar['1'] = '1' if __name__ == __main__:

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I feel this breaks most people's expectations... I think you are quite mistaken in this assumption. Sure, object references are difficult to grasp at first, but they are a highly useful concept, and follow very simple, systematic

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: I strongly suggest you reconsider as *most* programmers will not think about it this way. No you failed to understand my bug report apparently. I understand the behaviour. However, you failed to understand the problem. *PLEASE* read and think

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- resolution: wont fix - later ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: What you describe is the way Python is *designed* to work at a very fundamental level. Read about 'namespaces', and look at the computer science literature on 'call by object'. -- nosy: +r.david.murray resolution: later -

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: def list_again(foo): foo.append(bar) def list_again_again(foo): foo = foo + [1] if __name__ == __main__: bar = [] list_again(bar) print bar list_again_again(bar) print bar Ok so let me

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: In c pointers are *explicit*, ditto in c++, in java everything is a pointer. In asm, well that is asm. This behaviour in python, makes python code *really* hard to read and *hard* to understand. Can you python devs / people stop calling a bug

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- resolution: invalid - later ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: If you like I can look for this new security bugs in existing python projects and show you why this is a *very* bad idea. Please stop this python isolated mentality and autistic behaviour and consider the possibility of being wrong. --

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: Excuse me for reporting weird and not expected behaviour on behalf of *most* coders. Here https://bugs.edge.launchpad.net/ubuntu/+source/checkbox/+bug/625076 I understand python fine. If I have to find security bugs in *lots* more python projects

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: later - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- resolution: invalid - later status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/8/27 david rep...@bugs.python.org: david db.pub.m...@gmail.com added the comment: Excuse me for reporting weird and not expected behaviour on behalf of *most* coders. Your assumption that most coders are confused by this comes

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Yawn -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
Changes by david db.pub.m...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___ Python-bugs-list mailing

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Please use a language that makes sense to you then. -- nosy: +benjamin.peterson resolution: later - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The current design has existed for almost twenty years. It is deeply embedded in the language. For better or worse, it cannot and won't change. -- nosy: +rhettinger ___ Python

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: later - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: Please stop this python isolated mentality and autistic behaviour and consider the possibility of being wrong. ... No I didn't, did you read what I said? Also, repeatedly closing this bug isn't going to make it go away. You are kidding your self if

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702 ___ ___

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: david, please accept that regardless of whether this is a bug or not, people dealing with bug reports will always determine that it is no bug, and close it. *Please stop reopening this report*. If you want to appeal to this decision,

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: To quote the zen of python: Readability counts. Special cases aren't special enough to break the rules. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9702

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: Just to clarify that last comment. By exhibiting this behaviour python, introduces the potential for a lot more errors in code that seems to be correct to most people. Remember this bug is about the differences in behaviour for 'mutable' and

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread Theo Julienne
Theo Julienne theo.julie...@gmail.com added the comment: def list_again(foo): foo.append(bar) def list_again_again(foo): foo = foo + [1] The part that can be confusing is that 'foo' is a *copy* of a *reference* to an object. Because 'foo' is a copy, assigning to it will only

[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

2010-08-27 Thread david
david db.pub.m...@gmail.com added the comment: On 28 August 2010 09:10, Theo Julienne rep...@bugs.python.org wrote: Theo Julienne theo.julie...@gmail.com added the comment: def list_again(foo):        foo.append(bar) def list_again_again(foo):        foo = foo + [1] The part that can