Imagine this scenario:
I have a ZPT in Zope where I define, into a metal block, a global variable.
This variable takes its value from an expression like this
global myVar id | nothing;
global anotherVar 1;
where nothing
could be replaced with python:0
or python:False
or None
and so on.
Now imagine that into another block, I'll do something like
global myVar2 myVar | anotherVar | nothing;
where nothing
could be everything that I specified above.
Now suppose that id
hasn't a value and so myVar
took nothing
(or the other possible values; it's makes not difference at all).
What I expected was that myVar2
took anotherVar
's value, since anotherVar
has a value. But with great surprise, I notice that this isn't true and myVar2
took myVar
value; that means nothing
.
If I understand what is happening, I'll suppose that this kind of statement only control over existence of that variable and not over it's value.
Obviously I can make that kind of statement into a pythonic way and, of course, it works "well" (namely, as I expected)
So, someone can confirm or disprove what I suppose there ?