From: Thomas Wieczorek Date: 2007-11-06T21:48:57+09:00 Subject: Re: operator |= 2007/11/6, Fernando Cacciola : > Hi people, > > Did I dream about an opeartor |=? > It exists :) > > What does it do? > It works for integers like the binary OR: foo = 3 | 4 # result: 7 bar = 3 bar |= 4 # result: 7 Did you mean ||=? It is used to set default values if a variable is not definied yet. foo = 3 foo ||= 4 # foo doesn't change baz ||= 4 # baz is 4 if it wasn't defined before Regards, Thomas