Assigning 'nochage' to a variable.

cjfrovik@gmail.com bittervine at gmail.com
Sun Sep 4 15:58:12 EDT 2005


Has anyone else felt a desire for a 'nochange' value
resembling the 'Z'-state of a electronic tri-state output?

 var1 = 17
 var1 = func1()   # func1() returns 'nochange' this time
 print var1       # prints 17

It would be equivalent to:

 var1 = 17
 var2, bool1 = func1()
 if bool1:
   var1 = var2
 print var1       # prints 17  

BR/ CJF




More information about the Python-list mailing list