try: # get 'all' referents of objects
# note that gc.get_referents()
# returns () for dict...-iterators
from gc import get_referents as _getreferents
except ImportError: # no get_referents() in Python 2.2
def _getreferents(unused):
return () # sorry, no refs
throws a ParsingError.
The cause is the comments after the try statement. If you dedent the two line comments back two spaces everything parses as you would expect.
The same error appears to happen when you have an if statement where the first line is over indented with a comment
Running redbaron 0.6.3. Parsing the snippet below
throws a ParsingError. The cause is the comments after the try statement. If you dedent the two line comments back two spaces everything parses as you would expect.
The same error appears to happen when you have an if statement where the first line is over indented with a comment