cpplint error in "for ext in..."

3 posts / 0 new
Last post
jabirulo
jabirulo's picture
Offline
Last seen: 10 hours 41 min ago
Joined: 2013-05-30 00:53
cpplint error in "for ext in..."
  1. #PYTHON:Scripts/cpplint.py
  2. File "PYTHON:Scripts/cpplint.py", line 927
  3. _hpp_headers = {ext.strip() for ext in val.split(',')}
  4. ^
  5. SyntaxError: invalid syntax
  6. #

Is it a Python 2.5.4 problem? Tested under windows 10 with python 2.7.11 and worked fine.

Downloaded from: https://github.com/cpplint/cpplint

TiA

File attachments: 

AttachmentSize
Package icon cpplint.zip71.49 KB
gazelle
gazelle's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-04-13 12:52
Re: cpplint error in "for ext in..."

Yes, dictionary and set comprehensions was backported into 2.7 from 3.1 python.

  1. _hpp_headers = set()
  2. for ext in val.split(','):
  3. _hpp_headers.add(ext.strip())
jabirulo
jabirulo's picture
Offline
Last seen: 10 hours 41 min ago
Joined: 2013-05-30 00:53
Re: cpplint error in "for ext in..."

ok, thx and your fix works :-) but there are more "errors" and don't think I have enough python knowledge to "fix" and port it to v2.5.

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

Log in or register to post comments