Re: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)

2013-11-16 Thread Gregory Salvan
Hi, Some languages (C#, java) do the reverse by removing assertions if we don't tell compiler to keep them. Personnaly, I find this solution relatively accurate as I expect assertions not to be run in production. It would be painful to have this behaviour in python now, but I hope we'll keep a way

Re: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)

2013-11-17 Thread Gregory Salvan
I believe the point of removing assertions is also to avoid throwing unhandled developper errors to end-user and not only "performance". It's like "raise" without "try" block. It's certainly because I consider "assert" as a developper util, providing a concrete documentation about methods signatur

Re: [Python-Dev] One-line abstractmethod function?

2013-12-05 Thread Gregory Salvan
Hi, maybe a syntax like that can correspond: class MyObject(metaclass=ObjectSpec): ''' MyObject doc''' 'attr1 contains something' attr1 = None 'attr2 contains something' attr2 = str 'method1 do something' method1 = NotImplementedMethod('self', 'arg1', kwarg1=str) Meta