[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 : -- nosy: +rafe.kettler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

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

2010-08-28 Thread david
david added the comment: On 28 August 2010 22:41, david wrote: > > david added the comment: > > On 28 August 2010 22:34, R. David Murray wrote: >> >> R. David Murray added the comment: >> >> This is not an appropriate discussion for the bug tracker.  Please take it >> to the Python mailing

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

2010-08-28 Thread david
david added the comment: On 28 August 2010 22:34, R. David Murray wrote: > > R. David Murray added the comment: > > This is not an appropriate discussion for the bug tracker.  Please take it to > the Python mailing list. Fair enough. One last comment though (here) - I think that making muta

[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 added the comment: This is not an appropriate discussion for the bug tracker. Please take it to the Python mailing list. -- ___ Python tracker ___ _

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

2010-08-27 Thread david
david added the comment: On 28 August 2010 09:10, Theo Julienne wrote: > > Theo Julienne 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 *referen

[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 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 alter a local copy,

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

2010-08-27 Thread david
david 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 'immutable' objects. ---

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

2010-08-27 Thread david
david added the comment: To quote the zen of python: "Readability counts. Special cases aren't special enough to break the rules." -- ___ Python tracker ___ _

[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 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, please post a message to

[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' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

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

2010-08-27 Thread david
david 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 you think that 99%

[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 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 tracker

[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 : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[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 added the comment: 2010/8/27 david : > > david 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 from where? > > Here https://bugs.edge.launchpad.net/ubun

[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 added the comment: Please use a language that makes sense to you then. -- nosy: +benjamin.peterson resolution: later -> invalid status: open -> closed ___ Python tracker __

[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 : -- resolution: later -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[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 added the comment: -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[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 : -- resolution: invalid -> later status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[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 : -- resolution: later -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

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

2010-08-27 Thread david
david 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 to prove my point I w

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

2010-08-27 Thread david
david 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
Changes by david : -- resolution: invalid -> later ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[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 : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.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 : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2010-08-27 Thread david
david 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 reporter stupid when they

[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 : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2010-08-27 Thread david
david 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 without running the

[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 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 -> invalid status: open -> cl

[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 : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[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 : -- resolution: wont fix -> later ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2010-08-27 Thread david
david 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 about it. -- _

[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 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 principles - you just need

[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 : 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__": bar = 1 foo