Message202320
> 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. |
|
Date |
User |
Action |
Args |
2013-11-07 09:19:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, python-dev |
2013-11-07 09:19:06 | serhiy.storchaka | set | messageid: <1383815946.74.0.807893460299.issue19512@psf.upfronthosting.co.za> |
2013-11-07 09:19:06 | serhiy.storchaka | link | issue19512 messages |
2013-11-07 09:19:06 | serhiy.storchaka | create | |
|