Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[Feature Request]: Emit expression tags for comparisons and their operands

Ouverte
#1,212 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
54/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
java, python
Domaine
backend, testing-qa

Piste de recherche

Start by reading the Bytecode DSL compiler code that creates expression tags and the PythonLanguage @ProvidedTags declaration. Trace how comparison operands and results are compiled, then run or add debugger coverage for the examples in the issue, including chained comparisons and is None conditions. Done means each specified operand and comparison result is reported once, with short-circuited operands omitted.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement
Describe the feature

This request is to tag comparisons (==, <, in, is, chained comparisons, ...) and their operands with ExpressionTag. The tagged expressions should have their own source section.

Expected behavior

Stepping into expressions with SuspendAnchor.AFTER in

name = 'guest'
found = name in ('admin', 'guest')

should stop after each operand and after the comparison, with their source text and value:

Source text Value
name 'guest'
('admin', 'guest') ('admin', 'guest')
name in ('admin', 'guest') True

Other forms should behave like this:

  • In a chained comparison such as 1 < len(name) < 10, the middle operand is evaluated and reported once. When the chain stops early, the remaining operands are not reported.
  • A comparison used as an operand, as in (a == b) == c, is reported once.
  • For not (a in b) and not (a is b), only the comparison result of the whole not expression is reported. Like CPython, GraalPy compiles them as a not in b and a is not b, so a in b is never evaluated on its own.
  • is None and is not None comparisons are reported as well, including in if and while conditions.
Additional context

PythonLanguage lists StandardTags.ExpressionTag in its @ProvidedTags, but the Bytecode DSL compiler doesn't seem to tag such nodes with it, so Truffle tools won't find them. For example, a debugger session which steps with SourceElement.EXPRESSION won't stop there, so you can't see either the value or operands of the comparisons.

Langage dominant
Python
Étoiles
1.7k
Forks
156
Merge moyen
8 h 31 min
PR mergées (30 j)
55

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de oracle/graalpython

Toutes les issues de oracle/graalpython

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.