Thomas Grainger writes:
> Right but it's not a status code - it's a callback that you *must*
> call
OK. Thing is, Serhiy was just saying "hey I did almost exactly that
(but minor technical detail)". In your idiomatic usage, 'exit' is
almost invisible outside of the wrapped context manager.
Right but it's not a status code - it's a callback that you *must* call
On Fri, 16 Jul 2021, 17:17 MRAB, wrote:
> On 2021-07-16 12:44, Stephen J. Turnbull wrote:
> > Thomas Grainger writes:
> >
> > > Another example, is a cash point (ATM) won't give you your money
> > > until you take your
On 2021-07-16 12:44, Stephen J. Turnbull wrote:
Thomas Grainger writes:
> Another example, is a cash point (ATM) won't give you your money
> until you take your card
That ATM is effective in enforcing the desired behavior. In Python
you would usually use an exception to force handling.
Thomas Grainger writes:
> Another example, is a cash point (ATM) won't give you your money
> until you take your card
That ATM is effective in enforcing the desired behavior. In Python
you would usually use an exception to force handling. Returning
status codes, or couples of status codes
Another example, is a cash point (ATM) won't give you your money until you
take your card
On Fri, 16 Jul 2021, 09:28 Stephen J. Turnbull, <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:
> Ethan Furman writes:
>
> > Isn't that javascript? Javascript idioms are not (necessarily)
> > Python
Ethan Furman writes:
> Isn't that javascript? Javascript idioms are not (necessarily)
> Python idioms.
True, but unless there is (preferably) a Python idiom or one from
another language we borrow from at least somewhat frequently, why not
adopt the Javascript idiom?
Note: I don't think you
On 7/13/21 2:20 PM, Thomas Grainger wrote:
> On Tue, 13 Jul 2021, 21:31 Ethan Furman, wrote:
>> On 7/13/21 12:43 PM, Thomas Grainger wrote:
>>> I used the order I did because it's idiomatic to return the value the user
needs
>>> followed by the value the user wants.
>>
>> citation?
>
> Like the
Like the nodeback interface, it's (err, val)
On Tue, 13 Jul 2021, 21:31 Ethan Furman, wrote:
> On 7/13/21 12:43 PM, Thomas Grainger wrote:
>
> > I used the order I did because it's idiomatic to return the value the
> user needs
> > followed by the value the user wants.
>
> citation?
>
> --
>
On 7/13/21 12:43 PM, Thomas Grainger wrote:
> I used the order I did because it's idiomatic to return the value the user
needs
> followed by the value the user wants.
citation?
--
~Ethan~
___
Python-ideas mailing list -- python-ideas@python.org
To
also https://www.python.org/dev/peps/pep-0343/ probably needs updating - but
I'm not sure exactly what the code is
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
I used the order I did because it's idiomatic to return the value the user
needs followed by the value the user wants.
On Tue, 13 Jul 2021, 20:24 Serhiy Storchaka, wrote:
> 13.07.21 18:59, Thomas Grainger пише:
> > given that it's hard to implement this correctly I think there should be
> a
13.07.21 18:59, Thomas Grainger пише:
> given that it's hard to implement this correctly I think there should be a
> builtins.enter and builtins.aenter for use like this:
>
>
> ```
> @dataclasses.dataclass
> class WrapCmgr:
> _cmgr: ContextManager[T]
>
> def __enter__(self) ->
12 matches
Mail list logo