UserLinux chooses Python as "interpretive language" of choice

Jarek Zgoda jzgoda at
Sun Dec 21 08:16:33 CET 2003

Jp Calderone <exarkun at> pisze:

>> > Unless you design some silly rules to determine when empty parenthesis
>> > should be allowed - did a get assigned the return value of sys.exit()?
>> >  (yes I know it doesn't have one)
>> It has. The returned value is None.
>   A function must return to have a return value.  When does sys.exit()
> return?

Something, that is of type NoneType.

>>> def f():
...     print 'function'
>>> type(f)
<type 'function'>
>>> a = f()
>>> a
>>> type(a)
<type 'NoneType'>
>>> a__str__()

Anyway, isn't that function always returns value, even without explicit
"return" statement?

Jarek Zgoda
Unregistered Linux User # -1 JID:zgoda at

More information about the Python-list mailing list