Re: [Tutor] sig no matter what

2015-04-25 Thread eryksun
On Fri, Apr 24, 2015 at 10:46 PM, Jim Mooney wrote: > The docs don't mention that case is immaterial for aliases, when it usually > matters in Python. Section 7.2.3: Notice that spelling alternatives that only differ in case or use a hyphen instead of an underscore are also valid aliases

Re: [Tutor] sig no matter what

2015-04-25 Thread Jim Mooney
> See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation. > > https://docs.python.org/3/library/codecs.html > The docs don't mention that case is immaterial for aliases, when it usually matters in Python. The actual dictionary entries in aliases.py often differ in case from the docs

Re: [Tutor] sig no matter what

2015-04-24 Thread eryksun
On Fri, Apr 24, 2015 at 6:43 PM, Jim Mooney wrote: > It looks like sig works for any dash, underline combination, and is ignored > if there is no BOM: See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation. https://docs.python.org/3/library/codecs.html

[Tutor] sig no matter what

2015-04-24 Thread Jim Mooney
It looks like sig works for any dash, underline combination, and is ignored if there is no BOM: >>> farf = bytes('many moons ago I sat on a rock', encoding='utf8') >>> farf b'many moons ago I sat on a rock' >>> str(farf, encoding="utf_8_sig") 'many moons ago I sat on a rock' >>> str(farf, encoding