Opinion on best practice...

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Feb 7 17:58:42 EST 2013


Dennis Lee Bieber wrote:


> Line 3 has unquoted "echo" which is not a REXX command; it is
> considered an external command and is passed the /result/ of calling
> REXX time() -- where Windows executes it

Good lord, that's even worse than I feared. So it's not just unparsable
non-REXX code that is implicitly sent to the shell, but the equivalent to
Python's NameErrors. And you can implicitly mix calls to the shell and REXX
function calls in the same line.

I know that sometimes Python's lack of declarations for variables causes
problems. If you make a typo when assigning to a variable, Python will go
ahead and create a new variable. But if you make a typo when *calling* a
function, or try to call something that doesn't exist, you get an
exception, not silently pushing the typo off to some other process to be
executed.


-- 
Steven




More information about the Python-list mailing list