On Wed, 7 Dec 2022 at 18:40, Marco De Paoli <depao...@gmail.com> wrote: > Mi viene il dubbio che nel confronto tra tuple venga valutata una identità > tra oggetti... ma, al momento, non riesco ad approfondire la questione
Il confronto tra sequenze usa `is` come scorciatoia invece di `==`. https://docs.python.org/3/reference/expressions.html#comparisons """Sequences compare lexicographically using comparison of corresponding elements. The built-in containers typically assume identical objects are equal to themselves. That lets them bypass equality tests for identical objects to improve performance and to maintain their internal invariants.""" -- A. _______________________________________________ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python