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.

Author steven.daprano
Recipients darkdragon-001, steven.daprano
Date 2017-11-29.02:24:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511922286.24.0.213398074469.issue32163@psf.upfronthosting.co.za>
In-reply-to
Content
That's not a bug. That's because the file object does have an encoding attribute, which is set to None.

getattr only returns the default when the attribute doesn't exist, not if it exists but is None.
History
Date User Action Args
2017-11-29 02:24:46steven.dapranosetrecipients: + steven.daprano, darkdragon-001
2017-11-29 02:24:46steven.dapranosetmessageid: <1511922286.24.0.213398074469.issue32163@psf.upfronthosting.co.za>
2017-11-29 02:24:45steven.dapranolinkissue32163 messages
2017-11-29 02:24:45steven.dapranocreate