On 10/21/20 3:24 PM, Shaozhong SHI wrote:
> Is there another way to do this?
>
> def greet(name: str) -> str:
> return "Hello, " + name
> greet
>
> File "", line 1 def greet(name: str) -> str:
> ^ SyntaxError: invalid syntax
>
The hinting pep PEP (484) has an alternate syntax that doesn't b
On Thu, Oct 22, 2020 at 8:26 AM Shaozhong SHI wrote:
>
> Is there another way to do this?
>
> def greet(name: str) -> str:
> return "Hello, " + name
> greet
>
> File "", line 1 def greet(name: str) -> str:
> ^ SyntaxError: invalid syntax
If you need to support Python 2, don't use annotations.
Is there another way to do this?
def greet(name: str) -> str:
return "Hello, " + name
greet
File "", line 1 def greet(name: str) -> str:
^ SyntaxError: invalid syntax
--
https://mail.python.org/mailman/listinfo/python-list
I'm working on a C extension for frozendict. To make it working, I had to:
1. add by hand the whole path of dictobject.c
(/home/marco/sources/cpython/Objects/dictobject.c)
2. add -DPy_BUILD_CORE
3. add the whole path of CPython includes
(/home/marco/sources/cpython/Include and so on)
This works o