Martin, what is the exact mistake you made that prompted you to post this proposal? I'm guessing you had an except clause that named a non-existent exception, and you didn't have a test case that triggered that specific except clause. But did you have the old queue module's Full/Empty there, or did you have asyncio.queue.Full or asyncio.Full there?
There's also another possible use case for your proposal, where you actually have code that can either use asyncio or the threading queue module in the same try/except block, and you'd like to catch both exceptions. But this seems problematic, since you'd have to have a yield-from in there, which would make the code a generator even if you were using the threaded version. On Wed, Mar 18, 2015 at 5:46 AM, Martin Teichmann < [email protected]> wrote: > Hi Victor, > > Yes, exceptions have a different name because the queue module only >> contains queues, whereas asyncio is a large package which contains a >> lot of various classes: subprocesses, sockets, pipes, etc. "Full" >> would be confusing (pipe full? stream buffer full? etc.), "QueueFull" >> is more explicit for asyncio. >> > > But it could be made them the same. Just write > "from queue import Full as QueueFull, Empty as QueueEmpty" > in asyncio/queues.py instead of defining new classes. > > I'm porting code to asyncio, but I still have to maintain old code, > and I guess I'm not the only one out there, it would be just one > error less that might happen. > > Greetings > > Martin > -- --Guido van Rossum (python.org/~guido)
