[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fix the current test suite

From: Sam TH <sam_at_uchicago.edu>
Date: 2001-05-09 11:37:05 CEST

On Wed, May 09, 2001 at 02:11:55AM -0700, Greg Stein wrote:
> On Wed, May 09, 2001 at 03:38:39AM -0500, Sam TH wrote:
> > On Tue, May 08, 2001 at 05:46:12PM -0500, Ben Collins-Sussman wrote:
> > > Sam TH <sam@uchicago.edu> writes:
> > > > +import sys
> > > ...
> > > > - exit(1)
> > > > + sys.exit(1)
> > >
> > > Is the "sys" module not automatically loaded in all Python
> > > distributions? To be safe, must we always explicitly import it?
> > > (gstein?)
> >
> > Yup. Weird that it got automatically imported for you.
>
> Nothing got imported for him. He just never executed the exit(1) code. That
> would have thrown an error if he had.
>
> (exit is a builtin; somewhat bogus value, but there nonetheless)
>
> exit == 'Use Ctrl-D (i.e. EOF) to exit.'

Ah, that explains that error message. That has to have been the
weirdest error message python ever gave me. Now I know.

Seriously, is there any justification for having that in the global
namespace?
           
sam th --- sam_at_uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dynds.org/decss

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.