A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-January/151784.html below:

[Python-Dev] PEP 567 v3

[Python-Dev] PEP 567 v3 [Python-Dev] PEP 567 v3Yury Selivanov yselivanov.ml at gmail.com
Tue Jan 16 20:00:40 EST 2018
On Tue, Jan 16, 2018 at 6:53 PM, Guido van Rossum <guido at python.org> wrote:
> On Tue, Jan 16, 2018 at 3:26 PM, Victor Stinner <victor.stinner at gmail.com>
[..]
>> I don't think that it's worth it to prevent misuage of reset(). IMHO
>> it's fine if calling reset() twice reverts the variable state twice.
>
>
> Maybe the effect of calling it twice should be specified as undefined -- the
> implementation can try to raise in simple cases.
>
> Unless Yury has a use case for the idempotency? (But with __enter__/__exit__
> as the main use case for reset() I wouldn't know what the use case for
> idempotency would be.)

I don't have any use case for idempotent reset, so I'd change it to
raise an error on second call. We can always relax this in 3.8 if
people request it to be idempotent.

Yury
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4