Forgetting "()" when calling methods
Roy Smith
roy at panix.com
Mon Apr 28 15:08:42 EDT 2003
In article <s4uqavg0fjuucqve2vl4g03atpu25pdn97 at 4ax.com>,
Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> wrote:
>Frantisek Fuka <fuka at fuxoft.cz> wrote:
>
>>When I try to call methods, I sometimes forget to include the
>>parentheses. Instead of:
>>
>>if object.isGreen():
>> do something...
>>
>>i sometimes write:
>>
>>if object.isGreen:
>> do something...
>>
>
>It's the curse of Visual Basic.
I thought it was a perl-ism. You can use ()'s, or leave them out.
You can use & or leave it out too. Sometimes. Maybe. Depends if
it's a built-in or not, I think. Ugh.
>I suggest you take your frustration out on the person who persuaded
>you to learn VB in the first place.
Same comment goes for perl.
>Recovery may be found in hours of coding in just about any grown-up
>language.
Ditto, but the recovery time may be longer than just a few hours.
More information about the Python-list
mailing list