Christopher King wrote:
Sorry, I haven't upgraded to 3 yet.
No need to apologise for that! Python 2.7 will be around a long time yet.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
Sorry, I haven't upgraded to 3 yet.
On Thursday, June 30, 2011, Steven D'Aprano wrote:
> Christopher King wrote:
>
> I would go with __cmp__ which covers them all. 1 for greater, 0 for equal,
> -1 for less than.
>
>
>
> So-called "rich comparisons" using __lt__, __gt__, etc. have been preferred
Christopher King wrote:
I would go with __cmp__ which covers them all. 1 for greater, 0 for equal,
-1 for less than.
So-called "rich comparisons" using __lt__, __gt__, etc. have been
preferred since Python 2.1. The major advantage of them is that they can
be used for more complicated data ty
King
To: Alan Gauld
Cc: tutor@python.org
Sent: Thursday, 30 June, 2011 20:43:29
Subject: Re: [Tutor] The Card Game
I would go with __cmp__ which covers them all. 1 for greater, 0 for equal, -1
for less than.
On Thu, Jun 30, 2011 at 5:35 AM, Alan Gauld wrote:
>"Vincent Balmori"
I would go with __cmp__ which covers them all. 1 for greater, 0 for equal,
-1 for less than.
On Thu, Jun 30, 2011 at 5:35 AM, Alan Gauld wrote:
>
> "Vincent Balmori" wrote
>
>> I keep getting a Type Error since for the moment since the
>> values of the cards cannot be compared due to their
>> ty
"Vincent Balmori" wrote
I keep getting a Type Error since for the moment since the
values of the cards cannot be compared due to their
types.
Please send the complete error text sincethat will tell us
where to look etc.
I am thinking of creating a Card_Value class that will give each
rank
a