Currently asyncio.futures.Future.set_result will result in any callbacks
being scheduled using loop.call_soon instead of
loop.call_soon_threadsafe. However in situations where the future's
result is set from a different thread, the loop might not wake up as a
result of this if it is currently sleep
An issue I have is how to handle typos, whether implemented as a helper
or a __getattr__ method:
try:
...
raise ExceptionMaker.color_error("color out of range", color)
except ExceptionMaker.colr_error as e:
...
Each __getattr__ would dynamically create/return a new exception class
ba
I have a use case where I'm writing a small filter in Python which
should be able to take output from the find command to filter and
optionally pass it to other commands (like xargs), but also can be
passed specific filenames for the input and/or output. Find can output
it's filenames in null-term
This is just a hack idea I had for functions/methods that have
parameters with default values, possibly outside the control of the user
of said function, where sometimes it is desired to pass an argument to
the function that differs from the default but other times it is desired
to just use the def
Just a small idea that could possibly be useful for python decorators.
An idea I had is that it could be possible for a decorator function to
declare a parameter which, when the function is called as a decorator,
the runtime can fill in various information in the parameters for the
decorator to us
On 06/16/2018 01:22 AM, Steven D'Aprano wrote:
> Some of the information would be available in all
>> contexts, while other information may only be available in certain
>> contexts.The parameter's value cannot be explicitly specified, defaults
>> to Null except when called as a decorator, and can