Question about Objects

bas68 bas68 at cox.net
Fri Nov 21 11:30:29 EST 2003


Great community, glad I stopped in. Thanks for all the help!

"Fernando Rodriguez" <frr at easyjob.net> wrote in message
news:phcsrv08slg5tdoquvk6b5ve48bgf0i5vp at 4ax.com...
> On Fri, 21 Nov 2003 09:56:07 -0500, "campbell95" <campbell95 at cox.net>
wrote:
>
> >This is what I get when I test it. Why does <getSomething> not return the
> >value of <something>? is obvious that <something> has a value. I fear
this
> >is a simple oversight but I've racked my brain for hours looking at
online
>
> It is. ;-)
>
> >doc's and examples. Thanks for any help!!
> >
> >>Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on
> >win32
> >>Type "copyright", "credits" or "license()" for more information.
> >>****************************************************************
> >>IDLE 1.0      ==== No Subprocess ====
> >>>>>
> >>>>> x = Test("Microsoft Sucks")
> >>>>> x.getSomething
> >><bound method Test.getSomething of <__main__.Test instance at
0x00C01940>>
>
> Remember, this isn't VB: you can't leave the parens off when calling a
method.
> There's no difference between subs and functions in Python, and you must
> include the parens if you want to _call_ the function and get the value.
> Otherwise you get the function.
>
> It makes sense, it just that you're used to the peculiar MS-way of doing
> things. Your mind will heal, don't worry. ;-)
>






More information about the Python-list mailing list