Need array help

Paul McGuire ptmcg at austin.rr._bogus_.com
Fri Oct 6 20:45:56 CEST 2006


"Marion Long Jr" <mlongjr at verizon.net> wrote in message 
news:EkwVg.362$P92.105 at trndny02...
>I am switching from microsoft visual basic programming to python 
>programming.

Also, in anticipation of one of the most FA'ed Q's among VB->Python 
migrators, you must always include the parens after a function name to 
invoke the function.  That is, to call the method MethodWithNoArguments, you 
cannot write (as one would in VB):

val = MethodWithNoArguments

This simply assigns the method MethodWithNoArguments to name 'val'.  To 
invoke the method and assign the returned value to val, write:

val = MethodWithNoArguments()

And please don't ask for Python to be changed to be more VB-like in this 
regard - let Python be Python! :)

And welcome to the Python world!

-- Paul





More information about the Python-list mailing list