What's up with site.Quitter?

Fredrik Lundh fredrik at pythonware.com
Wed Sep 27 00:57:48 EDT 2006


James Stroud wrote:

> It seems I can find a reference to just about every type except those 
> for "exit" and "quit" in the standard library somewhere. E.g.:
> 
> py> type(__builtins__.Ellipsis) is types.EllipsisType
> True
> 
> However, in an appearant break with consistency, this can not be done 
> for "exit" and "quit" because site.Quitter is nested inside of the 
> setquit() function in the site.py module.

consistency with what?

the exact implementation of "quit" and "exit" is implementation and 
version dependent; if you need the type, use type(quit) and type(exit), 
respectively.

</F>




More information about the Python-list mailing list