Objects in Python
Jussi Piitulainen
jpiitula at ling.helsinki.fi
Wed Aug 22 10:31:52 EDT 2012
shaun writes:
> I'm having an issue its my first time using python and i set up a
> class one of the methods is supposed to return a string but instead
> returns:
>
> <bound method Param.returnString of <Param.Param instance at 0x00C
> 389E0>>
>
> Im very new to python and the object orientated feature doesnt seem
> to be as well put together as Java. Can anyone help with this
> problem?
I bet you are trying to call the method, returnString, without the
parentheses that enclose the parameters (and without any @property
stuff in the class).
>>> Para('dox').myWev
<bound method Para.myWev of <Para.Para object at 0xb7191dac>>
>>> Para('dox').myWev()
'dox'
More information about the Python-list
mailing list