Consider cleanup of type for iterator variables bounded by asdl_seq_LEN

Aperta
#99,652 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
backend

Direzione di ricerca

Inizia individuando la macro asdl_seq_LEN e rivedendo i suoi utilizzi nei quali le variabili iteratore vengono confrontate con il suo risultato. Individua le variabili interessate tipizzate come int o Py_ssize_t, quindi controlla i test esistenti pertinenti dopo aver reso coerenti i tipi in tutta la base di codice.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type-refactor

Feature or enhancement

It looks like the asdl_seq_LEN macro's "return type" is Py_ssize_t. Throughout the code, the type of the variable compared against a value "returned" by the macro are variously

int or
Py_ssize_t

Pitch

I am not sure, but it seems like it would be good to be consistent throughout the code base. If this is something that seems reasonable or valuable, I would be happy to take on the task!

Previous discussion

No previous discussion, however I searched prior issues and see nothing noting something similar.

Lingua principale
Python
Stelle
77.2k
Fork
36k
Merge medio
1g 9h
PR unite (30g)
558

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.