uot; might be that it sounds like you can
replace "else if" with "else x=94" if you want. Thumbs up for "else if"
because it explains what it is much better than "elif". "elseif" ?
--
Stian Søiland Work toward win-win situation. Wi
.ImmutableArrayList.fromCollection(L.getAbstractCollection())
python.util.functional.applyFunctionOnCollection(
(class implements python.util.functional.AnonymousFunction:
def anonymousFunction(x):
return x+1
), L)
--
Stian Søiland Work toward
2.
Please.
--
Stian Søiland Work toward win-win situation. Win-lose
Trondheim, Norway is where you win and the other lose.
http://soiland.no/ Lose-lose and lose-win are left as an
exercise to the reader. [Limoncelli/Hogan]
--
http://mail
#python each day.. "How do I
check if a variable is set?".
Why do you want to check if a variable is set at all? If you have so
many places the variable could or could not be set, your program design
is basically flawed and must be refactored.
--
Stian Søiland Work toward
cuiting of and-or and even
occasionally have used such masturbation techniques as this, I don't
think it qualifies as pythonic.
If it was me, I would probably even have written:
[x and math.sin(x)/x or 1 for x in myList]
--
Stian Søiland Work toward win-win situation. Win-lose
Trond
ionallity of Python.
Using yield_return could also make it more obvious that the result is in
fact a generator in functions that wrap generators.
--
Stian Søiland Work toward win-win situation. Win-lose
Trondheim, Norway is where you win and the other lose.
http://soiland.no/
n
implement the wrapping your self in NOTOK like this:
class NOTOK(object):
def __getattribute__(self, key):
obj = object.__getattribute__(key)
if hasattr(obj, "__get__"):
return obj.__get__()
return obj
# And similar for __setattr__ a
something_else
This will break the object.__hash__ shown above.. What about checking
if __hash__ has been overridden as well, and if so, always return id()?
--
Stian Søiland Work toward win-win situation. Win-lose
Trondheim, Norway is where y