Thread View: pl.comp.lang.python
2 messages
2 total messages
Started by Tomek Meka
Sun, 05 Jan 2003 15:41
"a" > 10000
Author: Tomek Meka
Date: Sun, 05 Jan 2003 15:41
Date: Sun, 05 Jan 2003 15:41
9 lines
1042 bytes
1042 bytes
Hej! Dlaczego python pozwala na takie wyrażenie (nie generuje błędu typów): >>> "a" > 10000 1 Jaki sens ma takie wyrażenie? Pozdrowienia, Tomek
Re:
Author: Kazik
Date: Mon, 06 Jan 2003 05:32
Date: Mon, 06 Jan 2003 05:32
21 lines
1480 bytes
1480 bytes
> Hej! > Dlaczego python pozwala na takie wyrażenie (nie generuje błędu typów): > >>> "a" > 10000 > 1 > > Jaki sens ma takie wyrażenie? > > Pozdrowienia, > Tomek Zacytuje tutorial: Note that comparing objects of different types is legal. The outcome is deterministic but arbitrary: the types are ordered by their name. Thus, a list is always smaller than a string, a string is always smaller than a tuple, etc. Mixed numeric types are compared according to their numeric value, so 0 equals 0.0, etc Pozdrawiam, Kazik -- Wysłano z serwisu Usenet w portalu Gazeta.pl -> http://www.gazeta.pl/usenet/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads