[Tutor] I have a problem with def

Bob Gailer bgailer at gmail.com
Fri Feb 23 08:49:57 EST 2018


On Feb 23, 2018 3:58 AM, "David Bauer" <davidallenbauer at gmail.com> wrote:
>
> it doesn't work, you are suppsed to declare a function as def func() and
it
> comes back as:
>
> File "<stdin>", line 1
>     def func()
>              ^
> SyntaxError: invalid syntax
>
> that is not expected I would also expect def to turn red because it is a
> keyword in Python, but that doesn't happen

That is an effect of syntax coloring. That in turn depends on what you're
using to enter your program. Please tell us what you are using to enter
your program and we can help with that.

anyone else having this
> problem???? Anyone know what I should do or look for????
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list