bob gailer wrote: > Alex Ezell wrote: > >> I am working on building a SOAP client. Unfortunately, one of the >> methods the SOAP server provides is named "import." The SOAP server is >> written in PHP. >> >> So, my problem is that Python really doesn't like me using the word >> "import" to call the SOAP method. >> > This seems unfortunate and too restrictive, to not allow keywords to be > used for other purposes, when the context makes it clear that its use is > not as a keyword. >
Python isn't the only language, try compiling this with a C compiler: int main(){ int char = 1; } test.c:3: error: expected identifier or ‘(’ before ‘=’ token or a C++ compiler: test.C:3: error: expected unqualified-id before ‘=’ token Or running this through a PHP interpreter: <?php function require() { print( "Hello World" ); } ?> PHP Parse error: syntax error, unexpected T_REQUIRE, expecting T_STRING in test.php on line 2 Oh, well. :-) > PL/I works that way: one may code > if if = then then > then = else > else > else = if > > Not that that is recommended coding style. > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor