Serhiy Storchaka added the comment:

> What is the problem with these changes?

Usually CPython team avoids code churn without serious reasons. Performance 
reasons for the change PySys_GetObject("stdout") to 
_PySys_GetObjectId(&_PyId_stdout) are ridiculous. You changed hundreds lines of 
code for speed up interactive mode by perhaps several microseconds.

> Errors become more unlikely because objects are only initialized once, near 
> startup. So it put also less pressure on code handling errors :) (it is 
> usually the least tested part of the code)

If there are bugs in code handling errors, they should be fixed in maintenance 
releases too.

> You mean for PyRun_InteractiveOneObject()? Oh, it can be made private, but 
> what is the problem of adding yet another PyRun_Interactive*() function? 
> There are already a lot of them :-)

And this is a problem. Newly added function is not even documented.

> I also worked hard to support unencodable filenames: using char*, you cannot 
> support arbitrary Unicode filename on Windows. That's why a added many 
> various functions with "Object" suffix. Some examples: 
> PyWarn_ExplicitObject(), PyParser_ParseStringObject(), 
> PyImport_AddModuleObject(), etc.

"One bug per bug report" as Martin says.

> Another problem is that PyUnicode_FromString() failure is not handled 
> correctly in some cases. PyUnicode_FromString() can fail because an decoder 
> error, but also because of a MemoryError.

It can't fail on "stdout" because an decoder error.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19512>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to