[Python-Dev] IOCP (I/O Completion Port) in Python ?

2013-09-10 Thread
Hello: I wondering why there is no standard IOCP module in Python ? As I know: Python3 have support epoll in linux and kqueue in freebsd. Is there a plan to add IOCP module for Windows ? Regards! peipei ___ Python-Dev mailing list Python-Dev@pyth

[Python-Dev] Why not support user defined operator overloading ?

2013-09-29 Thread
Hello: As far as I know, there is not a language support user defined operator overloading. Python3 can overloading belowed operators. - negated + unchanged - minus + add * multiplication / division // true division % remainder ** power

Re: [Python-Dev] Why not support user defined operator overloading ?

2013-09-29 Thread
Hello: I agree with Steven D'Aprano. Here is an example: class A(object): def __init__(self, value): self.value = value def add(self, other): return self.value + other.value __magic_method__ = {'+':add} a1 = A(1) a2 = A(2) We only n

Re: [Python-Dev] Why not support user defined operator overloading ?

2013-09-29 Thread
On 2013/9/30 8:53 Greg Ewing wrote: > It does need to know the operator's precedence and >associativity, though, which means either declaring >it somewhere, or having some kind of fixed rule I suggest all user defined operator are at lowest priority. Regards peipei ___