Possible to call single-parameter Python function without using parentheses?
Posted
by Jen
on Stack Overflow
See other posts from Stack Overflow
or by Jen
Published on 2010-05-28T22:23:13Z
Indexed on
2010/05/28
22:32 UTC
Read the original article
Hit count: 172
The Python documentation specifies that is is legal to omit the parentheses if a function only takes a single parameter, but
myfunction "Hello!"
generates a syntax error. So, what's the deal?
(I'm using Python 3.1)
© Stack Overflow or respective owner