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
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
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