Nick Coghlan added the comment:

Such codecs can be represented (for 3.4) by simply not setting the attribute 
and leaving the output types unspecified. We don't need that complexity for the 
standard library, and the "not specified" escape hatch means complex codecs 
will be no worse off than they are now.

The elegance of Victor's proposal is that it doesn't lock us out of solving the 
more complex cases later (where the codec's output type depends on the input 
type) by permitting a tuple or dict mapping input types to output types for 
"encodes_to" and "decodes_to", while still solving all of our immediate 
problems.

This is especially relevant since we can't effectively represent codec input 
types until we have a ByteSequence ABC to cover the "bytes-like object" case, 
so demanding that the general case be handled immediately is the same as 
requesting that the feature be postponed completely to Python 3.5.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to