Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

type coercion inconsistently fails depending on order of arguments

Aperta
#114 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@klarose ci sta già lavorando.

Dal 1/6/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

I was surprised to find that a less-than comparison failed between an integer and a float, since I thought I had seen it work earlier. Sure enough, it works if the left hand side is a float, but not if the left hand side is an int.

Example:

# good
python -m celpy -n '4.0 < 10'
true

# bad
python -m celpy -n '10 < 4.0'
ERROR: <input>:1:1 found no matching overload for 'relation_lt' applied to '(<class 'celpy.celtypes.IntType'>, <class 'celpy.celtypes.DoubleType'>)'
    | 10 < 4.0

Both of these work in golang, see cel playground

I expect both statements to properly evaluate. This appears to affect a bunch of other operators (<=, >, >=)

Lingua principale
Python
Stelle
174
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 cloud-custodian/cel-python

Tutte le issue di cloud-custodian/cel-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.