code: def hacking_python3x_except_compatible(logical_line, noqa):
      r
      if noqa:
          return
  
      def is_old_style_except(logical_line):
          return (',' in logical_line and
                  ')' not in logical_line.rpartition(',')[2])
  
      if (logical_line.startswith("except ") and
              logical_line.endswith(':') and
              is_old_style_except(logical_line)):
          yield 0, "H231: Python 3.x incompatible 'except x,y:' construct"
docs: r"""Check for except statements to be Python 3.x compatible
  
      As of Python 3.x, the construct 'except x,y:' has been removed.
      Use 'except x as y:' instead.
  
  
      Okay: try:\n    pass\nexcept Exception:\n    pass
      Okay: try:\n    pass\nexcept (Exception, AttributeError):\n    pass
      H231: try:\n    pass\nexcept AttributeError, e:\n    pass
      Okay: try:\n    pass\nexcept AttributeError, e:  # noqa\n    pass