[Python-Dev] PEP 461 updates

Ethan Furman ethan at stoneleaf.us
Thu Jan 16 06:52:08 CET 2014


On 01/15/2014 05:17 PM, Carl Meyer wrote:
>
> I think the PEP could really use a rationale section

It will have one before it's done.


> Also I think it would be useful to have a section summarizing the
> primary objections that have been raised, and why those objections have
> been overruled

Excellent point.  That section will also be present.


>> In order to avoid the problems of auto-conversion and value-generated
>> exceptions,
>> all object checking will be done via isinstance, not by values contained
>> in a
>> Unicode representation.  In other words::
>>
>>    - duck-typing to allow/reject entry into a byte-stream
>>    - no value generated errors
>
> This seems self-contradictory; "isinstance" is type-checking, which is
> the opposite of duck-typing.

Good point, I'll reword that.  It will be duck-typing.


> I think it might also be good to expand (very) slightly on what "the
> problems of auto-conversion and value-generated exceptions" are

Will do.


>> .. [2] TypeError, ValueError, or UnicodeEncodeError?
>
> TypeError seems right to me. Definitely not UnicodeEncodeError - refusal
> to implicitly encode is not at all the same thing as an encoding error.

That's the direction I'm leaning, too.

Thanks for your comments!

--
~Ethan~


More information about the Python-Dev mailing list