Re: DecoratorTools will not run with python -OO

Christopher Stelma <[email protected]> Mon, 7 Dec 2009 17:19:26 -0500
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
That was just an example, the same would need to be done for all
template functions.  I haven't looked into the internals enough to
know what could be replaced.

On Mon, Dec 7, 2009 at 4:55 PM, Jorge Vargas <[email protected]> wrote:
> Hello PJE
>
> Thanks for your feedback. I first assumed it was a problem with the
> function templating feature but I wasn't 100% sure Thanks for
> confirming that. Since this isn't exclusive to TG I closed that ticket
> as wontfix.
>
> Christopher that seems like a good workaround. Do we really need
> rewrap to have a docstring? perhaps it could just be declared as a
> variable.
>
> On Mon, Dec 7, 2009 at 3:45 PM, Christopher Stelma <[email protected]> wrote:
>> The doc strings are needed, but you can manually assign them and
>> things work fine.
>>
>> def rewrap(__original, __decorated):
>>     """return __decorated($args)"""
>> rewrap.__doc__ = """return __decorated($args)"""
>>
>> On Mon, Dec 7, 2009 at 1:58 PM, P.J. Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> wrote:
>>>
>>> At 12:38 PM 12/7/2009 -0600, Jorge Vargas wrote:
>>>>
>>>> Hello,
>>>>
>>>> Today someone reported the following "bug" with DecoratorTools. In the
>>>> ticket http://trac.turbogears.org/ticket/2426 I confirmed current
>>>> trunk has the problem. It's a very naive bug as the code is simply
>>>> trying to update a variable that doesn't exists due to the -OO
>>>> parameter. I just want to bring that up to your attention to see if
>>>> this is worth fixing or not.
>>>
>>> It is not fixable in current versions - DecoratorTools will not work correctly without doc strings...  and anything that uses DecoratorTools' function templating feature will have the same problem.
>>>
>>> _______________________________________________
>>> PEAK mailing list
>>> [email protected]
>>> http://www.eby-sarna.com/mailman/listinfo/peak
>>
>>
>>
>> --
>> Christopher Stelma
>> Digsby Developer
>> [email protected]
>>
>



-- 
Christopher Stelma
Digsby Developer
[email protected]