Missing "While True"
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- compilers, reverse-engineering
Línea de trabajo
Run the supplied Python 3.8 example through uncompyle6 and compare the output with the expected behavior. Trace the decompilation path handling the nested if and for inside while True; done means the while True loop is preserved and the duplicated return output is corrected.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
"While True" will disappear if a "if" branch is indirectly under it
How to Reproduce
import time
L = ['a', 's']
def thread():
while True:
for c in L:
if c == 'a':
return
time.sleep(0.5)
Output Given
# uncompyle6 version 3.9.1.dev0
# Python bytecode version base 3.8.0 (3413)
# Decompiled from: Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
# Embedded file name: simple.py
# Compiled at: 2024-03-05 23:05:50
# Size of source mod 2**32: 157 bytes
import time
L = ["a", "s"]
def thread():
for c in L:
if c == "a":
return return None
time.sleep(0.5)
Expected behavior
def thread():
+ while True:
+ for c in L:
+ if c == "a":
+ return
- for c in L:
- if c == "a":
- return return None
time.sleep(0.5)
Environment
- Uncompyle6 version: output from
uncompyle6 --versionuncompyle6 3.9.1.dev0 - xdis version: output from
pydisasm --versionpydisasm, version 6.1.0.dev0 - Python version for the version of Python the byte-compiled the file:
python -c "import sys; print(sys.version)"wherepythonis the correct CPython or PyPy binary.
3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] - OS and Version: Windows 11 (23H2)
- Lenguaje dominante
- Python
- Estrellas
- 4.3k
- Forks
- 464
- Merge medio
- 10 h 7 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rocky/python-uncompyle6
-
Works on decompyle3
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
rocky/python-uncompyle6#506 · 1 comentario ·
-
Python 3.8 Volunteer wanted Works on decompyle3
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
rocky/python-uncompyle6#492 · 4 comentarios ·
-
Redundant "else:"AbiertoControl Flow Python 3.8 Volunteer wanted Works on decompyle3
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
rocky/python-uncompyle6#486 ·
-
Duplicate Python 3.9+
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
rocky/python-uncompyle6#484 · 9 reacciones ·
-
Double return is printedAbiertoBug Python 3.8 Volunteer wanted Works on decompyle3
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
rocky/python-uncompyle6#459 · 3 comentarios ·
Todos los issues de rocky/python-uncompyle6
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
UKGovernmentBEIS/control-arena#917 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
debpalash/VoiceStudio#2937 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws-samples/sample-per-model-bedrock#261 ·
Los mantenedores suelen responder en 1 día