Re: Python-list Digest, Vol 196, Issue 26

2020-01-27 Thread DL Neil via Python-list
On 28/01/20 5:17 AM, Michael Torrie wrote: On 1/27/20 12:03 AM, אורי wrote: Please don't reply to digest. Replying to a digest is just fine. Just make sure to change the subject line in the future so people know what it's referring to. Excepting that whilst this practice (subject to faithful

Re: Python-list Digest, Vol 196, Issue 26

2020-01-27 Thread Michael Torrie
On 1/27/20 12:03 AM, אורי wrote: > Please don't reply to digest. Replying to a digest is just fine. Just make sure to change the subject line in the future so people know what it's referring to. -- https://mail.python.org/mailman/listinfo/python-list

Re: Clarification on Immutability please

2020-01-27 Thread Chris Angelico
On Tue, Jan 28, 2020 at 2:44 AM Souvik Dutta wrote: > > If the two objects have the same value that means that when called all of > them will point to the same object rather than creating the same value - > object pairs twice. Immutability is the characteristics that does not let you > change t

Re: Clarification on Immutability please

2020-01-27 Thread Chris Angelico
On Tue, Jan 28, 2020 at 1:13 AM Musbur wrote: > > Am 21.01.2020 19:38 schrieb Chris Angelico: > > Are you sure that it does? I can't reproduce this. When you slice the > > first two from a tuple, you create a new tuple, and until the > > assignment happens, both the new one and the original coexis

Re: Sandboxing eval() (was: Calculator)

2020-01-27 Thread Musbur
Thanks, Chris (and others), for the comprehensive answer (as usual). I got interesting insights into Python's inner workings. Of course, when everything is an object, everything has parents and other relatives, so by traversing that tree in the right way one can make one's way all the way to t

Re: Clarification on Immutability please

2020-01-27 Thread Musbur
Am 21.01.2020 19:38 schrieb Chris Angelico: On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker wrote: and even that the first id(mytup) returns the same address as the second one, I am left wondering exactly what immutability is. Let's look at id()'s documentation: id(object) Return the