Assignment versus binding

Rustom Mody rustompmody at gmail.com
Tue Oct 4 22:28:46 EDT 2016


On Wednesday, October 5, 2016 at 6:22:45 AM UTC+5:30, Steve D'Aprano wrote:
> On Wed, 5 Oct 2016 04:12 am, Rustom Mody wrote:
> 
> > On Tuesday, October 4, 2016 at 10:06:00 PM UTC+5:30, Steve D'Aprano wrote:
> >> On Tue, 4 Oct 2016 09:32 pm, Rustom Mody wrote:
> >> 
> >> > Are not the contents of the scope and the shape of the scope different
> >> > things?
> >> 
> >> 
> >> What does "the shape of the scope" mean?
> >> 
> >> Scopes don't have a shape -- they aren't geometric objects. So I'm afraid
> >> I don't understand what distinction you are trying to make.
> > 
> > Ok I was speaking quasi metaphorically
> > If you have some non-metaphors please tell!
> 
> I think that by "shape" of the scope, you mean "some identifier or
> description which identifies the scope" -- e.g. "globals", "builtins",
> function foo, function bar, etc.

No
I want to talk of a higher level of collectivity than (what you are calling)
*one* scope

Something analogous to:
a = [1,2,3]
b = [[1,2,3]]
c = [1,[2,3]]
d = [1,[2],3]

“a,b,c,d have the same stuff, shaped (or whatever verb you like) differently”

eg How would you explain that with
e = ["p", "q", "r"]

a and e are same
and
a and b are same
with the two ‘sames’ being different?



More information about the Python-list mailing list