Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision a3d6d23a923d62a713b9e4536d5f7ce7313d99c7 authored by Miss Islington (bot) on 11 June 2020, 19:32:37 UTC, committed by GitHub on 11 June 2020, 19:32:37 UTC
Add hdf5 with .h5 file extension See 'Recommendations' section for mime types from the HDF group: https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/ Patch by Mark Schwab. (cherry picked from commit 60c2a810e37994fc640c58d0ef45b6843354b770) Co-authored-by: MARK SCHWAB <32745414+schwabm@users.noreply.github.com>
1 parent 3e499cd
Tip revision: a3d6d23a923d62a713b9e4536d5f7ce7313d99c7 authored by Miss Islington (bot) on 11 June 2020, 19:32:37 UTC
bpo-40626: Support HDF5 in mimetypes (GH-20042)
bpo-40626: Support HDF5 in mimetypes (GH-20042)
Tip revision: a3d6d23
iso2022_kr.py
#
# iso2022_kr.py: Python Unicode Codec for ISO2022_KR
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_kr')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
codecs.IncrementalEncoder):
codec = codec
class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
codecs.IncrementalDecoder):
codec = codec
class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
codec = codec
class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
codec = codec
def getregentry():
return codecs.CodecInfo(
name='iso2022_kr',
encode=Codec().encode,
decode=Codec().decode,
incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder,
streamreader=StreamReader,
streamwriter=StreamWriter,
)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...