spaces and arguements..
D-Man
dsh8290 at rit.edu
Fri Jun 1 14:07:25 EDT 2001
On Fri, Jun 01, 2001 at 01:02:14PM -0400, John wrote:
| Hi,
|
| Am I mistaken or is there a way to invoke a method with arguements that
| are separated by spaces instead of in brackets? Much like print x, y ?
| So if I had a method foo(x) can I call foo x ?
'print' is a statement, thus is doesn't use parenthesis. If you put
them there, you are not calling a function, but rather (possibly)
adjusting order of operations while creating a sub expression.
When calling a function, the parenthesis tell the compiler that you
want to call it. Function calls always need parens. This is
consistency, not perl <wink>.
-D
More information about the Python-list
mailing list