compiler errors - Python 3: "Expected an indent Block" in a comment -
i new here , german (so english not good).
i have written function in python , @ top want have comment. problem is, python says "expected indent block" error in comment.
def makeonefeedscript(): z = 1 cfeedlist = [str("null")]*3 #liste mit länge der feeds erstellen #listen für 1. 2. 3. post, usw, ifeedlist = [] #liste für posttime des 1. posts pro feed iifeedlist = [] #liste für posttime des 2. posts pro feed iiifeedlist = [] #liste für posttime des 3. posts pro feed ivfeedlist = [] #liste für posttime des 4. posts pro feed vfeedlist = [] #liste für posttime des 5. posts pro feed vifeedlist = [] #liste für posttime des 6. posts pro feed in range(z): #alle daten aus dateien lesen s = "/usr/lib/advanced-feed/tmp/" + str(i) #speicherortspeichern f = open(s, "rb") #Öffnen
all dependent lines must indented:
def makeonefeedscript(): z = 1 cfeedlist = [str("null")]*3 #liste mit länge der feeds erstellen # listen für 1. 2. 3. post, usw, ifeedlist = [] #liste für posttime des 1. posts pro feed iifeedlist = [] #liste für posttime des 2. posts pro feed iiifeedlist = [] #liste für posttime des 3. posts pro feed ivfeedlist = [] #liste für posttime des 4. posts pro feed vfeedlist = [] #liste für posttime des 5. posts pro feed vifeedlist = [] #liste für posttime des 6. posts pro feed in range(z): #alle daten aus dateien lesen s = "/usr/lib/advanced-feed/tmp/" + str(i) #
the indentation level important!
if speicherort speichern
comment, must preceded comment character:
# speicherort speichern f = open(s, "rb") #Öffnen
if part of previous code, ....
in range(z): #alle daten aus dateien lesen s = "/usr/lib/advanced-feed/tmp/" + str(i) # # speicherort speichern f = open(s, "rb") #Öffnen ... (presumably "f")
Comments
Post a Comment