importing classes python

Posted by Richard on Stack Overflow See other posts from Stack Overflow or by Richard
Published on 2010-06-08T12:09:34Z Indexed on 2010/06/08 12:22 UTC
Read the original article Hit count: 222

Filed under:
|

Just wondering why

import sys
exit(0)

gives me this error:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in ?
    exit(0)
TypeError: 'str' object is not callable

but

from sys import exit
exit(0)

works fine?

© Stack Overflow or respective owner

Related posts about python

Related posts about importerror