On 11/03/2021 11:01, Rob Cliffe via Python-list wrote:
> This is a valid Python program:
>
> def f(): pass
> print(f)
>
> But at the REPL:
>
> >>> def f(): pass
> ... print(f)
> File "", line 2
> print(f)
> ^
> SyntaxError: invalid syntax
>
> It doesn't seem to matter what the sec
On 3/11/2021 6:01 AM, Rob Cliffe via Python-list wrote:
This is a valid Python program:
def f(): pass
print(f)
But at the REPL:
>>> def f(): pass
... print(f)
File "", line 2
print(f)
^
SyntaxError: invalid syntax
It doesn't seem to matter what the second line is. In the REPL y
This is a valid Python program:
def f(): pass
print(f)
But at the REPL:
>>> def f(): pass
... print(f)
File "", line 2
print(f)
^
SyntaxError: invalid syntax
It doesn't seem to matter what the second line is. In the REPL you have
to leave a blank line after the "def" line. Why?
T