On 3/26/19 12:26 PM, Matthew Herzog wrote:
> elif fileDate = datetime.strptime(name[0:8], DATEFMT).date():
>                    ^
> SyntaxError: invalid syntax

are you assigning (=) or comparing (==)?

you can't do both in one statement because of the side effect implications.

[except that starting with Python 3.8 you will be able to (see PEP 572),
but that will be a brand new operator,  := ]


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to