[Python-Dev] Builtin exit, good in interpreter, bad in code.

Nick Coghlan ncoghlan at gmail.com
Mon Apr 24 08:51:14 CEST 2006


Sean Reifschneider wrote:
> Thoughts?

As Martin pointed out, this was fixed for 2.5a1:

C:\>type demo.bat
@c:\python%1\python -c "exit()"
@echo %ERRORLEVEL%

C:\>demo 24
Traceback (most recent call last):
   File "<string>", line 1, in ?
TypeError: 'str' object is not callable
1

C:\>demo 25
0

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list