From: David Garamond Date: 2002-08-24T21:47:14+09:00 Subject: Re: equivalent of python's __debug__ ts wrote: >>>>>>"D" == David Garamond writes: >>>>> > > D> def foo(self, x, y): > D> if __debug__: > D> self.__doc__x = "...some longish string..." > D> self.__doc__y = "...some also longish string..." > D> self.__doc_spec1__ = "...yet another string..." > D> ... > D> ... > > Well, I've perhaps not understood but you can write (like previously said) > > pigeon% ruby -e 'if $DEBUG; a = "a long string"; p a; end' > pigeon% > > pigeon% ruby -de 'if $DEBUG; a = "a long string"; p a; end' > "a long string" > pigeon% but "a long string" still gets allocated by ruby. i want optimize _away_ the debug portion, so ruby doesn't consider it exist at all. -- dave