0001 """ Python 'ascii' Codec 0002 0003 0004 Written by Marc-Andre Lemburg (mal@lemburg.com). 0005 0006 (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. 0007 0008 """ 0009 import codecs 0010 0011 ### Codec APIs 0012 0013 class Codec(codecs.Codec): 0014 0015 # Note: Binding these as C functions will result in the class not 0016 # converting them to methods. This is intended. 0017 encode = codecs.ascii_encode 0018 decode = codecs.ascii_decode 0019 0020 class StreamWriter(Codec,codecs.StreamWriter): 0021 pass 0022 0023 class StreamReader(Codec,codecs.StreamReader): 0024 pass 0025 0026 class StreamConverter(StreamWriter,StreamReader): 0027 0028 encode = codecs.ascii_decode 0029 decode = codecs.ascii_encode 0030 0031 ### encodings module API 0032 0033 def getregentry(): 0034 0035 return (Codec.encode,Codec.decode,StreamReader,StreamWriter) 0036
Generated by PyXR 0.9.4