Decompiling Python2.7 list literal produces indices instead of values
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- compilers, reverse-engineering
Research direction
Reproduce the issue using the provided r.py, Python 2.7.18, py_compile, and the uncompyle6 command, then inspect the Python 2.7 list-literal decompilation path. Compare the generated list with the constants in r.pyc and add coverage showing that [239, 168, 254, 54, 235, 128] is preserved rather than emitted as indices.
Written by the indexing model from the issue text.
Description
Description
Decompiling Python2.7 list literal produces indices instead of values
How to Reproduce
$ printf 'x = 1\nL = [239, 168, 254, 54, 235, 128]\n' > r.py
$ python2 -c "import py_compile; py_compile.compile('r.py')"
$ uncompyle6 r.pyc
# uncompyle6 version 3.9.3
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.13.15 (main, Aug 12 2026, 10:32:31) [GCC 16.2.0]
# Embedded file name: r.py
# Compiled at: 2026-09-30 13:48:38
x = 1
L = [1, 2, 3, 4, 5, 6]
return
# okay decompiling r.pyc
Expected behavior
L = [239, 168, 254, 54, 235, 128]
Environment
uncompyle6, version 3.9.3
pydisasm, version 6.1.7
Python 2.7.18
Priority
It is a silent failure which can cost extra developer time.
Additional Context
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 465
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rocky/python-uncompyle6
-
Works on decompyle3
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rocky/python-uncompyle6#506 · 1 comment ·
-
Python 3.8 Volunteer wanted Works on decompyle3
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rocky/python-uncompyle6#492 · 4 comments ·
-
Redundant "else:"OpenControl Flow Python 3.8 Volunteer wanted Works on decompyle3
Difficulty 4/5 3-5 days Newbie friendliness 45/100
rocky/python-uncompyle6#486 ·
-
Missing "While True"OpenControl Flow Python 3.8 Volunteer wanted Works on decompyle3
Difficulty 4/5 3-5 days Newbie friendliness 45/100
rocky/python-uncompyle6#485 · 4 comments ·
-
Duplicate Python 3.9+
Difficulty 5/5 Over a week Newbie friendliness 25/100
rocky/python-uncompyle6#484 · 9 reactions ·
All issues in rocky/python-uncompyle6
Similar issues
-
defect from-review v0.9.2
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
khuisman/mcp-gee-sweet#926 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 84/100
EtanHey/brainlayer#1164 ·
Maintainers usually reply within 1 day
-
bug security
Difficulty 1/5 Under an hour Newbie friendliness 88/100
yunaremaia/vibeguard#141 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PrismorSec/prismor#599 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day