你是认真的吗?
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 5
if x<0:
^
SyntaxError: invalid character '<' (U+FF1C)
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 6
return x+f(x-1)
^
SyntaxError: invalid character '(' (U+FF08)
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 6
return x+f(x-1)
^
SyntaxError: invalid decimal literal
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 10
print(f (100))
^
SyntaxError: invalid character '(' (U+FF08)
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 10
print(f (100))
^
SyntaxError: invalid character '(' (U+FF08)
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 10
print(f (100))
^
SyntaxError: invalid decimal literal
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
File "/tmp/./main.py", line 10
print(f (100))
^
SyntaxError: invalid character ')' (U+FF09)
$ vim main.py
$ cat main.py
#!/usr/bin/env python
#coding=utf-8
def f(x):
if x<0:
return x+f(x-1)
else:
return 0
print(f (100))
$ ./main.py
0
$ ./main.py
0
$ ./main.py
0
$
|