Kent Johnson wrote:
variable, it has no effect outside the method; inside a method, self is
just a method parameter, nothing more. There is some magic that gives
self its value for the call.
When __init__() is called the new instance has already been created, you
are just initializing it
Orri Ganel wrote:
> Hello all,
> I was just messing around with a suggestion w chun (wescpy at gmail
> dot com) gave (to make a class that handles time, ie:
>
>> >> import myTime
>> >> c = myTime.myTime(10,30)
>> >> print c
> 10:30
>> >> d = myTime.myTime(8,45)
>> >> print c + d
> 19:15
>
>
Hello all,
I was just messing around with a suggestion w chun (wescpy at gmail
dot com) gave (to make a class that handles time, ie:
>>> import myTime
>>> c = myTime.myTime(10,30)
>>> print c
10:30
>>> d = myTime.myTime(8,45)
>>> print c + d
19:15
etc), and I was trying to make it like th