On Sunday, April 6, 2014 1:40:58 PM UTC+5:45, Devin Jeanpierre wrote: > > You can choose to define mutability that way, but in many contexts > you'll find that definition not very useful. > > c is such that you could have another variable d, where the following > interpreter session fragment is easily possible: > > > >>> c == d > True > >>> foo(c) > >>> c == d > False
Its called referential transparency (or rather the lack of it) And that is why it (Johns question) is not a good idea. In general worshipping overzealously at the altar of RT produces functional programming. To the non-zealots this has the characteristic of "Throw out baby with bathwater" On the other hand imperative programming is a source of more problems than people realize: http://blog.languager.org/2012/11/imperative-programming-lessons-not.html -- https://mail.python.org/mailman/listinfo/python-list