PythonCharmers/python-future

past.translation: support `raise x, y, z`

Open

#318 geöffnet am 8. Jan. 2018

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (327 Forks)batch import
0.20enhancementexceptionshelp wanted

Repository-Metriken

Stars
 (1.172 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

hi! first off, thanks for future and past.translation. they're awesome.

i noticed that autotranslate doesn't support the old raise x, y, z syntax. here's an issue to track adding it, if you want. thanks in advance!

steps to reproduce:

$ echo 'raise None, None, None' > x.py
$ python3
...
>>> from past import autotranslate
>>> autotranslate(['x'])
>>> import x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File ".../local3/lib/python3.6/site-packages/past/translation/__init__.py", line 402, in load_module
    code = compile(source, self.pathname, 'exec')
  File ".../3.6/lib/python3.6/lib2to3/fixes/fix_zip.py", line 1
    raise None, None, None
              ^
SyntaxError: invalid syntax
>>>

Contributor Guide