[issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for

2018-12-28 Thread Alisue Lambda
Alisue Lambda added the comment: https://github.com/python/asyncio/pull/419 It seems the PR above which has not merged solve the issue. -- ___ Python tracker <https://bugs.python.org/issue33

[issue34406] Typo in documentation

2018-08-14 Thread Alisue Lambda
Change by Alisue Lambda : -- title: Type in documentation -> Typo in documentation ___ Python tracker <https://bugs.python.org/issue34406> ___ ___ Python-

[issue34406] Type in documentation

2018-08-14 Thread Alisue Lambda
New submission from Alisue Lambda : https://docs.python.org/3.8/using/windows.html#removing-the-max-path-limitation Current > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled Should be > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\File

[issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for

2018-08-07 Thread Alisue Lambda
Alisue Lambda added the comment: I use the following patch to fix the behavior in Windows. ``` import sys if sys.platform != 'win32': def patch(): pass else: def patch(): """Patch selectors.SelectSelector to fix WinError 10038 in Windows

[issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for

2018-04-24 Thread Alisue Lambda
Alisue Lambda <lambdali...@hashnote.net> added the comment: I've found an workaround. The point is that 'with s' should be included in a coroutine which will be timed-out. import asyncio import socket ADDR = ('10.0.2.1', 22) async def check(loop): s = socket.

[issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for

2018-04-24 Thread Alisue Lambda
Alisue Lambda <lambdali...@hashnote.net> added the comment: I should have mentioned that the script works well on macOS and Linux. This issue exists only on Windows. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for

2018-04-24 Thread Alisue Lambda
New submission from Alisue Lambda <lambdali...@hashnote.net>: This is my first time to create an issue on the python bug tracker so let me know if I don't follow the rule which I need to follow. # Summary Using 'loop.sock_connect' with 'asyncio.wait_for' raises 'OSError [WinError

Re: Strange behavior related to value / reference

2009-10-28 Thread Lambda
On Oct 28, 10:40 am, Chris Rebert c...@rebertia.com wrote: On Tue, Oct 27, 2009 at 7:15 PM, Lambda stephenh...@gmail.com wrote: I defined a function to raise a 2x2 matrix to nth power: def matrix_power(m, n):  result = m[:] Note that this only copies the *outer* list. It does NOT copy

Strange behavior related to value / reference

2009-10-27 Thread Lambda
I defined a function to raise a 2x2 matrix to nth power: def matrix_power(m, n): result = m[:] print result is m for i in range(n - 1): result[0][0] = result[0][0] * m[0][0] + result[0][1] * m[1][0] result[0][1] = result[0][0] * m[0][1] + result[0][1] * m[1][1] result[1][0] =

How to define a class that can act as dictionary key?

2009-09-15 Thread Lambda
Hi, I'd like to define a class to use it as a dictionary key: class dict_entry: def __init__(self, term = , doc_freq = 0): self.term = term self.doc_freq = doc_freq def __cmp__(self, entry): return isinstance(entry, dict_entry) and cmp(self.term, entry.term) def