-- Forwarded message --
>> From: Suresh Sharma
>> Date: Monday, December 5, 2011
>> Subject: class print method...
>> To: "d...@davea.name <mailto:d...@davea.name>" > <mailto:d...@davea.name>>
>>
>>
>> Dave,
>> Thanx f
On 12/5/2011 8:09 AM, Dave Angel wrote:
useful, such as if you print a list. The __str__() method of list calls
the __repr__() for each object inside it. So it can be useful to define
both, even if you decide to have them do the same thing.
If you want __str__ and __repr__ to do the same thing
On 12/05/2011 07:41 AM, Lie Ryan wrote:
On 12/05/2011 10:18 PM, Suresh Sharma wrote:
Pls help its really frustrating
-- Forwarded message --
From: Suresh Sharma
Date: Monday, December 5, 2011
Subject: class print method...
To: "d...@davea.name <mailto:d...@davea.name>
On 12/05/2011 10:18 PM, Suresh Sharma wrote:
Pls help its really frustrating
-- Forwarded message --
From: Suresh Sharma
Date: Monday, December 5, 2011
Subject: class print method...
To: "d...@davea.name <mailto:d...@davea.name>" mailto:d...@davea.name>>
On Mon, Dec 5, 2011 at 10:18 PM, Suresh Sharma wrote:
>
> Suit=[aces,clubs,diamonds,hearts]
> Rank=[2,3,4,5,6,7,8,9,j,Q,K,A]
> class Card:
> Def __init__(self,rannk,suiit):
> Self.suiit=suiit
> Self.rannk=rannk
>
> Def __str__(self):
> Return suit[suiit],rank[rannk]
>
> Class deck:
> Def __init__(
Pls help its really frustrating
-- Forwarded message --
From: Suresh Sharma
Date: Monday, December 5, 2011
Subject: class print method...
To: "d...@davea.name"
Dave,
Thanx for the quick response, i am sorry that i did not explain correctly
look at the code below inspi
On 12/05/2011 02:11 AM, Suresh Sharma wrote:
Hello All,
I am new to python and i have stuck up on a particular issue with classes,
i understand this might be a very dumb question but please help me out.
I have created two classes and whenever i try to print the objects i get
this message but not
Hello All,
I am new to python and i have stuck up on a particular issue with classes,
i understand this might be a very dumb question but please help me out.
I have created two classes and whenever i try to print the objects i get
this message but not the data, __main__.cards instance at (mem