This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年06月02日 13:35 by Sebastian.Kreft.Deezer, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg219585 - (view) | Author: Sebastian Kreft (Sebastian.Kreft.Deezer) | Date: 2014年06月02日 13:35 | |
Although it is already explained that the default mode of the opened tempfiles is 'w+b' a warning/notice section should be included to make it clearer. I think this is important as the default for the open function is to return strings and not bytes. I just had to debug an error with traceback, as traceback.print_exc expects a file capable of handling unicode. |
|||
| msg219723 - (view) | Author: Josh Rosenberg (josh.r) * (Python triager) | Date: 2014年06月03日 21:53 | |
Adding warnings for something that is clearly documented (both in the constructor prototype line and again in the spelled out documentation of the "mode" argument) is wasteful, particularly when accidental misuse would immediately lead to an exception being thrown the second you attempted to write a str (so there is no risk of partial or silent failure that might lead to an inconsistent state). As a rule, Python doesn't litter the documentation with warnings unless it's a matter of security or minor version compatibility. This doesn't affect security, behaves identically across all releases of Python 3, etc. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:04 | admin | set | github: 65836 |
| 2014年06月03日 21:58:09 | r.david.murray | set | status: open -> closed resolution: rejected stage: resolved |
| 2014年06月03日 21:53:56 | josh.r | set | nosy:
+ josh.r messages: + msg219723 |
| 2014年06月02日 13:35:34 | Sebastian.Kreft.Deezer | create | |