[Python-Dev] Hi!

2018-08-15 Thread Marko Ristin-Kaufmann
Hi python devs,
Please let me briefly introduce myself. I'm Marko and live in Zurich,
Switzerland. I learned Python and Django during an intership in 2007 and
followed its development ever since.

I did research in computer vision (at ETH Zurich). I work now at Parquery
AG (Zurich, Switzerland) where we implement most of our infra-structure in
Python 3.

Cheers,
Marko
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Pre- and post-conditions

2018-08-15 Thread Marko Ristin-Kaufmann
Hi python devs,

I would be very interested to bring design-by-contract into python 3. I
looked at some of the packages I found on pypi and also we rolled our own
solution (https://github.com/Parquery/icontract/). I also looked into
https://www.python.org/dev/peps/pep-0316/.

However, all these solutions seem quite clunky to me. The decorators
involve an unnecessary computational overhead and the implementation of
icontract became quite tricky once we wanted to get the default values of
the decorated function.

What do you think about the following solution as an extension to python
compiler / interpreter?

* We specify pre- and post-conditions in the docstring.
* Python interpreter parses these conditions and adapts the corresponding
byte codes at the begining and the end of the function body.

I'm very grateful for any feedback on this!

Marko
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Pre- and post-conditions

2018-08-15 Thread Chris Barker via Python-Dev
This is an appropriate topic for pyton-ideas:

https://mail.python.org/mailman/listinfo/python-ideas

not python-dev.

I'm sure you'll find interest in your idea there.

-CHB


On Wed, Aug 15, 2018 at 1:25 AM, Marko Ristin-Kaufmann <
marko.ris...@gmail.com> wrote:

> Hi python devs,
>
> I would be very interested to bring design-by-contract into python 3. I
> looked at some of the packages I found on pypi and also we rolled our own
> solution (https://github.com/Parquery/icontract/). I also looked into
> https://www.python.org/dev/peps/pep-0316/.
>
> However, all these solutions seem quite clunky to me. The decorators
> involve an unnecessary computational overhead and the implementation of
> icontract became quite tricky once we wanted to get the default values of
> the decorated function.
>
> What do you think about the following solution as an extension to python
> compiler / interpreter?
>
> * We specify pre- and post-conditions in the docstring.
> * Python interpreter parses these conditions and adapts the corresponding
> byte codes at the begining and the end of the function body.
>
> I'm very grateful for any feedback on this!
>
> Marko
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> chris.barker%40noaa.gov
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Pre- and post-conditions

2018-08-15 Thread Marko Ristin-Kaufmann
Hi Chris,
Thanks for pointing me to the other list! I'll write there.

Cheers,
Marko

Le mer. 15 août 2018 à 18:35, Chris Barker  a écrit :

> This is an appropriate topic for pyton-ideas:
>
> https://mail.python.org/mailman/listinfo/python-ideas
>
> not python-dev.
>
> I'm sure you'll find interest in your idea there.
>
> -CHB
>
>
> On Wed, Aug 15, 2018 at 1:25 AM, Marko Ristin-Kaufmann <
> marko.ris...@gmail.com> wrote:
>
>> Hi python devs,
>>
>> I would be very interested to bring design-by-contract into python 3. I
>> looked at some of the packages I found on pypi and also we rolled our own
>> solution (https://github.com/Parquery/icontract/). I also looked into
>> https://www.python.org/dev/peps/pep-0316/.
>>
>> However, all these solutions seem quite clunky to me. The decorators
>> involve an unnecessary computational overhead and the implementation of
>> icontract became quite tricky once we wanted to get the default values of
>> the decorated function.
>>
>> What do you think about the following solution as an extension to python
>> compiler / interpreter?
>>
>> * We specify pre- and post-conditions in the docstring.
>> * Python interpreter parses these conditions and adapts the corresponding
>> byte codes at the begining and the end of the function body.
>>
>> I'm very grateful for any feedback on this!
>>
>> Marko
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov
>>
>>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R(206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115   (206) 526-6317   main reception
>
> chris.bar...@noaa.gov
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com