Re: Programming By Contract for Python

2023-03-02 Thread David Szent-Györgyi


Down the rabbit hole we go: Hypothesis 
looks worth a look.


I know that some time back, I posted a message with links on Hypothesis and 
Pydantic. I haven't had time to explore them. In case the links are of use 
in the current dive down the rabbit hole: 
Tools of Interest: Hypothesis and Pydantic for Property-based Testing 
 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/16fbea49-1d7c-44b1-b038-4e3485bd62b0n%40googlegroups.com.


Re: Programming By Contract for Python

2023-02-26 Thread Edward K. Ream
On Sunday, February 26, 2023 at 3:26:40 AM UTC-6 Edward K. Ream wrote:

CrossHair  looks nifty. 


The in a supported syntax 
 link 
in CrossHair's readme shows what contracts look like. Intriguing.

Down the rabbit hole we go: Hypothesis 
looks worth a look.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1e581a69-0fe5-478c-99d0-9855dc3f4561n%40googlegroups.com.


Re: Programming By Contract for Python

2023-02-26 Thread Edward K. Ream
On Sat, Feb 25, 2023 at 11:06 PM Thomas Passin  wrote:

> https://github.com/Parquery/icontract
>

Thanks for this link.  The icontract readme
 contains several additional
links.

CrossHair  looks nifty. There is a vs-code plugin for it so
Leonistas can play with CrossHair *now *using leoInteg!

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1Xtxma1bgo3FVfVXdqZpD8t17oDmJA%3DNk%3DMfsjFPR6nw%40mail.gmail.com.


Programming By Contract for Python

2023-02-25 Thread Thomas Passin
I just learned something new that may be of interest to some devs.  There 
are a few packages that add Programming By Contract to Python.  In 
particular, iContract:

https://github.com/Parquery/icontract

If you have not heard of this approach, it was introduced in the Eiffel 
language in the late 1980s.  From Wikipedia:

"It prescribes that software designers should define formal 
<https://en.wikipedia.org/wiki/Formal_methods>, precise and verifiable 
interface specifications for software components 
<https://en.wikipedia.org/wiki/Component-based_software_engineering#Software_component>,
 
which extend the ordinary definition of abstract data types 
<https://en.wikipedia.org/wiki/Abstract_data_type> with preconditions 
<https://en.wikipedia.org/wiki/Precondition>, postconditions 
<https://en.wikipedia.org/wiki/Postcondition> and invariants. These 
specifications are referred to as "contracts", in accordance with a conceptual 
metaphor <https://en.wikipedia.org/wiki/Conceptual_metaphor> with the 
conditions and obligations of business contracts."

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a87d091c-ad97-4e74-a75f-42b2dd2151a6n%40googlegroups.com.