Results 646 comments of Nathaniel J. Smith

Ah, yeah, that's similar to the `run_args={}` idea I mentioned above, except using a class instead of a dict to pass the options. That has the advantage that the class...

> For example, each time you're faced with the decision of whether to pass the `*args` in the `partial()` call, or pass only the `**kwargs` and leave the `*args` for...

@buhman if you can convince python-dev of that then we can certainly revisit this :-).

I have suggested, half in jest, that trio should add `trio.withargs` or something as an alias for `functools.partial`, to make it feel less weird and scary. It might actually be...

There was a substantial discussion/brainstorming session about this in chat yesterday, starting around here: https://gitter.im/python-trio/general?at=5c19957cb8760c21bbed7ee9 I think there are 3 reasons there's ongoing tension here: (1) intuitively it seems like...

More brainstorming in chat: https://gitter.im/python-trio/general?at=5c4a4449f780a1521f638f59

Doing some paid work tonight, I'm being annoyed again by having to use `functools.partial` every time I call `run_sync_in_worker_thread`. I think at this point we can be fairly confident we've...

Oh, wait, there's a second kind of compositionality problem. There are places where trio *generates* a kwarg: in particular, `nursery.start` automagically passing `task_status=...`. And I guess `serve` functions might end...

The discussion around [PEP 570](https://www.python.org/dev/peps/pep-0570/) made me realize an interesting corner case... even if we have a signature like: ```python async def run(async_fn, *args, **kwargs): ``` ...then technically it's not...

Looking at this again after a long absence (partly motivated by https://github.com/python-trio/trio/issues/1104#issuecomment-630000695), I'm wondering why we never considered borrowing Python's dunder convention: ```python trio.run(f, x=1, __clock__=custom_clock) nursery.start_soon(f, x=1, __name__="custom name")...