[SOLUCIONADO] Python Invalid Syntax "->"

Iniciado por DonPython, Marzo 09, 2020, 12:54:32 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Marzo 09, 2020, 12:54:32 PM Ultima modificación: Marzo 09, 2020, 08:07:25 PM por AXCESS
Buenos días amigos de Underc0de, tengo el siguiente problema::
Estaba instalando JSParser y de repente tuve el problema con "->", estoy usando Python 2.7:

class _Selectable(Protocol):
    def fileno(self) -> int:
        pass

Invalid syntax:
Traceback (most recent call last):
  File "handler.py", line 2, in <module>
    import tornado.ioloop, tornado.web, tornado.autoreload
  File "/usr/local/lib/python2.7/dist-packages/tornado-6.0.4-py2.7-linux-x86_64.egg/tornado/ioloop.py", line 67
    def fileno(self) -> int:
                           ^
SyntaxError: invalid syntax

Código fuente:
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Agradeceré su ayuda.

@You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Amigo, ejecuta la versión 3.

Ejemplo:

Código: bash
python3 <script en python>.py


El comando python3 es el que se usa para ejecutat python en la versión 3.

~ DtxdF
PGP :: <D82F366940155CB043147178C4E075FC4403BDDC>

~ DtxdF