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.

作者 vstinner
收信人 Arfrever, ezio.melotti, gregory.p.smith, lemburg, loewis, pitrou, vstinner
日期 2010-05-03.22:31:06
SpamBayes Score 0.00032492276
Marked as misclassified
Message-id <1272925867.75.0.570614710694.issue8514@psf.upfronthosting.co.za>
In-reply-to
内容
> IIUC, that usage is an equivalent transformation, i.e. the code doesn't
> change its behavior. It is mere refactorization.

I changed os.getenv() to accept byte string key (in a previous commit), but I don't like this hack. If we have os.environb, os.getenv() shouldn't support bytes anymore (but use str only, as before).

--

I worked a little more on fsencode()/os.environb, trying to fix all issues. fsdecode() is no more needed if we have os.environb, and fsencode() can be simplified to:

  def fsencode(value):
     return value.encode(sys.getfilesystemencoding(), 'surrogateescape')

fsdecode() leads to mojibake.
历史
日期 用户 动作 参数
2010-05-03 22:31:07vstinner修改recipients: + vstinner, lemburg, loewis, gregory.p.smith, pitrou, ezio.melotti, Arfrever
2010-05-03 22:31:07vstinner修改messageid: <1272925867.75.0.570614710694.issue8514@psf.upfronthosting.co.za>
2010-05-03 22:31:06vstinner链接issue8514 messages
2010-05-03 22:31:06vstinner创建