On 25/03/20 9:14 am, Dennis Sweeney wrote:
I think my confusion is about just how precise this sort of
"reference implementation" should be. Should it behave with ``str``
and ``tuple`` subclasses exactly how it would when implemented?

No, I don't think so. The purpose of a Python implementation
of a proposed feature is to get the intended semantics across,
not to reproduce all the quirks of an imagined C implementation.

If you were to bake these details into a Python reference
implementation, you would be implying that these are *intended*
restrictions, which (unless I misunderstand) is not what you
are intending.

(Back when yield-fron was being designed, I described the
intended semantics in prose, and gave an approximate Python
equivalent, which went through several revisions as we thrashed
out exactly how the feature should behave. But I don't think
it ever exactly matched all the details of the actual
implementation, nor was it intended to. The prose turned out
to be much more readable, anway.:-)

--
Greg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RD72YLECP7WTXVQBRPHECMGHFQGHWYSO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to