spaces and arguements..
aleaxit at yahoo.com
Fri Jun 1 21:47:25 CEST 2001
"John" <john.thai at dspfactory.com> wrote in message
news:3UPR6.243439$Z2.2750797 at nnrp1.uunet.ca...
> Am I mistaken or is there a way to invoke a method with arguements
> 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 ?
No. The ability (and sometimes necessity) to avoid parentheses in
calls _used to be_ a hallmark of Visual Basic, not Python.
*Used to* because, moving from VB6 to VB7 aka VB.NET, Microsoft
has introduced many incompatible changes in Visual Basic, the
main ones being:
a. no more default properties on objects and set/let distinction
b. all calls now require parentheses ()
c. and/or now short-circuit
d. addition of += &c
e. passing by value now default
f. optional arguments must now have defaults
g. added "return value" statement
h. arrays now always start indexing from 0, no more
fancy non-0-starting indices
i. array-assignment gives assignment of *reference* to
shared array-object -- you call an explicit method to
copy the array if you want a copy instead
j. no more automatic conversion between numbers and
k. no more fixed-length string variables
l. Default True is 1, not -1 any more
m. generic type isn't Variant any more -- it's Object,
which is now a *reference* to any kind of data
n. try/catch & finally rather than 'onerror'
Interestingly enough, each one of these decisions takes
VB closer to Python in syntax and/or semantics...:-).
More information about the Python-list