{"action":"opened","issue":{"url":"https://api.github.com/repos/liftoff/pyminifier/issues/34","labels_url":"https://api.github.com/repos/liftoff/pyminifier/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/liftoff/pyminifier/issues/34/comments","events_url":"https://api.github.com/repos/liftoff/pyminifier/issues/34/events","html_url":"https://github.com/liftoff/pyminifier/issues/34","id":56777563,"number":34,"title":"Reduce operators causes trouble with multiple decorators","user":{"login":"sdekrijger","id":5486978,"avatar_url":"https://avatars.githubusercontent.com/u/5486978?v=3","gravatar_id":"","url":"https://api.github.com/users/sdekrijger","html_url":"https://github.com/sdekrijger","followers_url":"https://api.github.com/users/sdekrijger/followers","following_url":"https://api.github.com/users/sdekrijger/following{/other_user}","gists_url":"https://api.github.com/users/sdekrijger/gists{/gist_id}","starred_url":"https://api.github.com/users/sdekrijger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdekrijger/subscriptions","organizations_url":"https://api.github.com/users/sdekrijger/orgs","repos_url":"https://api.github.com/users/sdekrijger/repos","events_url":"https://api.github.com/users/sdekrijger/events{/privacy}","received_events_url":"https://api.github.com/users/sdekrijger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-06T07:01:46Z","updated_at":"2015-02-06T07:01:46Z","closed_at":null,"body":"Given this test code:\r\n```python\r\nfrom functools import wraps\r\n\r\ndef my_decorator(extra_value=None):\r\n    def _my_decorator(view_func):\r\n        def _decorator(request, *args, **kwargs):\r\n            # maybe do something before the view_func call\r\n            # that uses `extra_value` and the `request` object\r\n            response = view_func(request, *args, **kwargs)\r\n            # maybe do something after the view_func call\r\n            return response\r\n        return wraps(view_func)(_decorator)\r\n    return _my_decorator\r\n\r\nclass Test(object):\r\n  \r\n  @my_decorator()\r\n  @my_decorator()\r\n  def foo(request): \r\n    return 'yes'\r\n```\r\nThe output causes an IndentationError :\r\n\r\n```python\r\n#!/usr/bin/python\r\nfrom functools import wraps\r\ndef my_decorator(extra_value=None):\r\n def _my_decorator(view_func):\r\n  def _decorator(request,*args,**kwargs):\r\n   response=view_func(request,*args,**kwargs)\r\n   return response\r\n  return wraps(view_func)(_decorator)\r\n return _my_decorator\r\nclass Test(object):\r\n @my_decorator()\r\n@my_decorator()\r\n def foo(request):\r\n  return 'yes'\r\n# Created by pyminifier (https://github.com/liftoff/pyminifier)\r\n```\r\nI tracked it down to the reduce_operators function, seems that tokens and strings are being mixed up (there is no untokenize call, and out_tokens is not used) ?\r\n"}}