Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Decompiling Python2.7 list literal produces indices instead of values

クローズ
#527 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
4.3k
フォーク
465
平均マージ
4日 11時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rocky/python-uncompyle6 のほかの issue

rocky/python-uncompyle6 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。