Dear Group,
Hope everyone is fine.
I was trying some examples of Python class.
I took the following example from Ubuntu forum[http://ubuntuforums.org/
showthread.php?t=578930]
class Person(object):
def _init_(self,name,age):
self.name=name
self.age=age
as
On Fri, Jul 30, 2010 at 10:53 PM, joy99 wrote:
> class Person(object):
>def _init_(self,name,age):
>self.name=name
>self.age=age
>
> constructor has double underscores (both as prefix and suffix) __init__
--
Regards
Shashank Singh
Senior Undergraduate, De
joy99 wrote:
> class Person(object):
> def _init_(self,name,age):
> self.name=name
> self.age=age
>
> as i wrote the code using IDLE on WinXP SP2, with Python2.6.5, I am
> getting the following error:
>
> >>> p=Person('Subha',40)
>
> Traceback (most recen