Ir ao conteúdo

Posts recomendados

Postado

fui usar o comando goto no python, ele disse que não existia isso... fui no pip instalar, e deu isso:

Spoiler

┌──(usuario㉿computador)-[~]
└─$ pip install goto                                                             
Defaulting to user installation because normal site-packages is not writeable
Collecting goto
  Using cached goto-0.1.3.tar.gz (7.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-dgm5uezw                
         cwd: /tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/   
    Complete output (10 lines):                                                  
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/goto/__init__.py", line 10, in <module>                                               
        from . import goto                                                       
      File "/tmp/pip-install-o2z_tgbi/goto_17eaa9f255f7408ba97728700edf1af6/goto/goto.py", line 86                                                                
        print '<<< [%02i] %s %s' % (_req_cnt, 'POST' if post else 'GET', url)    
              ^                                                                  
    SyntaxError: invalid syntax                                                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/24/b5/12814d5951e82253e9936eccac77c2f058cb2dcee1c4219efef82408df5a/goto-0.1.3.tar.gz#sha256=50c26e9cedb822f9d413217525ca921f981feea2cc0209bc27047e1edcd69d70 (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
  Using cached goto-0.1.2.tar.gz (7.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-28hssa3c                
         cwd: /tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/   
    Complete output (10 lines):                                                  
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/goto/__init__.py", line 10, in <module>                                               
        from . import goto                                                       
      File "/tmp/pip-install-o2z_tgbi/goto_7931831903254f8a866dfe6ab982736c/goto/goto.py", line 86                                                                
        print '<<< [%02i] %s %s' % (_req_cnt, 'POST' if post else 'GET', url)    
              ^                                                                  
    SyntaxError: invalid syntax                                                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/e2/b5/e93cbdb33723b73ce44a094eb0d9cf5b6d16f903bd171cac04a9f229b321/goto-0.1.2.tar.gz#sha256=19d2b020e3d0ce3ad5bba5090cf3a25836343d678406feded375f5d22867e3fd (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
  Using cached goto-0.1.1.tar.gz (7.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6gag7bnd                
         cwd: /tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/   
    Complete output (10 lines):                                                  
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/goto/__init__.py", line 10, in <module>                                               
        from . import goto                                                       
      File "/tmp/pip-install-o2z_tgbi/goto_ab375987c04949e287224bde9bac2898/goto/goto.py", line 86                                                                
        print '<<< [%02i] %s %s' % (_req_cnt, 'POST' if post else 'GET', url)    
              ^                                                                  
    SyntaxError: invalid syntax                                                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/0b/00/778e1aa343c82652ab08f0b79c99cbfb8fb177dc6fede3a17afe6eb5b2bf/goto-0.1.1.tar.gz#sha256=4ca2e0fe49c3ecd62b740f4e1c9cc82d8e2e8a067ea6d70082c3a8b0f73f6c14 (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
  Using cached goto-0.1.0.tar.gz (7.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9lfom4i8                
         cwd: /tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/   
    Complete output (10 lines):                                                  
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/goto/__init__.py", line 10, in <module>                                               
        from . import goto                                                       
      File "/tmp/pip-install-o2z_tgbi/goto_1524bb1f4e304922b2a736cc4489cad8/goto/goto.py", line 85                                                                
        print '<<< [%02i] %s %s' % (_req_cnt, 'POST' if post else 'GET', url)    
              ^                                                                  
    SyntaxError: invalid syntax                                                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/8b/8d/3f6ca4ffe09c3c8ba42224ad529e9de83f7ca39d6bb80c1aa1ca9d49ab4c/goto-0.1.0.tar.gz#sha256=38a47872ca755da7ab7054e7ae968aa8a0aafdf3da82012a3443f9f6e4c3ef2c (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
  Using cached goto-0.0.2.tar.gz (7.0 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-q7kdxqv5                
         cwd: /tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/   
    Complete output (10 lines):                                                  
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/goto/__init__.py", line 10, in <module>                                               
        from . import goto                                                       
      File "/tmp/pip-install-o2z_tgbi/goto_baea194fa52b44cc81a98090cb79ff19/goto/goto.py", line 82                                                                
        print '<<< [%02i] %s %s' % (_req_cnt, 'POST' if post else 'GET', url)    
              ^                                                                  
    SyntaxError: invalid syntax                                                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/da/35/aa95cfe18a5c9b06b4ae5612f1ce2640bbc5eff56f03d1a759a8cb24089f/goto-0.0.2.tar.gz#sha256=0656c15b28037a4f1add9ee28564f6c1b649b7da71fa722fe09d46d4343687cb (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
  Using cached goto-0.0.1.tar.gz (7.0 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gn91d8fy                
         cwd: /tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/   
    Complete output (9 lines):                                                   
    Traceback (most recent call last):                                           
      File "<string>", line 1, in <module>                                       
      File "/tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/setup.py", line 3, in <module>                                                        
        import goto                                                              
      File "/tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/goto/__init__.py", line 14, in <module>                                               
        class CallableModule(types.ModuleType):                                  
      File "/tmp/pip-install-o2z_tgbi/goto_ce63f488e90a4a5b89e0e8c0dde07f7d/goto/__init__.py", line 22, in CallableModule                                         
        decode_qs = staticmethod(utils.decode_qs)                                
    AttributeError: module 'utils' has no attribute 'decode_qs'                  
    ----------------------------------------                                     
WARNING: Discarding https://files.pythonhosted.org/packages/dc/52/e37a0922af678143a240184f760549b8e65901dd776ea2eaeedcae31b461/goto-0.0.1.tar.gz#sha256=39d14001d1e76c97878d8abba334ff401af654e04a96a562baca7501b9ba9b04 (from https://pypi.org/simple/goto/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                              
ERROR: Could not find a version that satisfies the requirement goto
ERROR: No matching distribution found for goto
┌──(usuario㉿computador)-[~]
└─$ 

Edit: não funciona nem com sudo

Postado

@Um mero usuário    o comando goto é considerado difícil de manter a organização do código , e assim não é boa prática usa-lo , e as linguagem mais novas não incluíram ele por esse mesmo motivo , e é melhor não usa-lo mesmo ,  e você pode substitui-lo pelo while .

Postado

@devair1010 entendo... o problema é que foi considerado uma má prática por causa das pessoas que usaram o goto sem limite, fazendo aqueles códigos espaguete, vai pra lá, volta pra cá, vai pra lá de novo... eu gosto de usar só pra encurtar caminho entre loops, pular a introdução ou ir para o fim

 

existe alguma forma de instalar alguma biblioteca ou eu mesmo criar uma sobre o goto? sinto muita falta dele

Crie uma conta ou entre para comentar

Você precisa ser um usuário para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

LANÇAMENTO!

eletronica2025-popup.jpg


CLIQUE AQUI E BAIXE AGORA MESMO!