[Python-checkins] python/dist/src/Python import.c,2.175.2.2,2.175.2.3

Guido van Rossum guido@python.org
Sun, 02 Jun 2002 09:01:32 -0400


> > > +                     PySys_WriteStderr(
> > > +                             "# code too large: can't write %s\n",
> > > +                             cpathname);
> > 
> > Maybe this should be a call to PyErr_Warn instead?
> 
> That's fine with me.  But I'm not sure the warning will be helpful.
> Any suggestions for wording?  Is what's there good enough?
> 
> Here's my suggestion:
> 
>        PyOS_snprintf(buffer, sizeof(buffer),
>                      "code too large: can't write %.80s\n",
>                      cpathname);
>        PyErr_Warn(PyExc_RuntimeWarning, buffer);

I take it back.  All warnings with writing pyc files are reported in
this fashion (i.e., a message is printed only in verbose mode).

--Guido van Rossum (home page: http://www.python.org/~guido/)