Hi all,
I’d like your comments and feedback on an enhancement that introduces power
assertions to the Python language.
Proposal
This feature is inspired by a similar feature of the Groovy language[1], and is
effectively a variant of the `assert` keyword.
When an assertion expression ev
> This is cool.
Thank you. Much appreciated.
> AFAIK pytest does something like this. How does your implementation differ?
The pytest implementation is very powerful in the way of hints and suggestions
that point to the difference and source, but when the asserted expression has
more than one su
2QdxY4RzWzUUiLuE@potatochowder.com wrote:
> On 2021-09-12 at 07:28:53 -0700,
> Guido van Rossum gu...@python.org wrote:
> > What about asserts that are not used for testing, but as classic
> > “unless there’s a bug, this should hold”? Those may not want to incur
> > the extra cost.
> > I was actual
> Maybe you all could collaborate on a PEP? This sounds a worthy topic.
.
Yes, I would love that please.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman
Hi All,
Following the discussions on "Power Assertions: Is it PEP-able?", I've drafted
this PEP.
Your comments are most welcome.
PEP:
Title: Power Assertion
Author: Noam Tenne
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 24-Sep-2021
Abstract
===
Will do!
On Fri, Sep 24, 2021, at 14:10, Paul Moore wrote:
> On Fri, 24 Sept 2021 at 12:05, Noam Tenne wrote:
>
> > Caveats
> > ---
> >
> > It is important to note that expressions with side effects are affected by
> > this feature. This is because in o
utils and setuptools—
> officially accept that a full featured test framework will be left to third
> parties.
>
> NOTE: if the proposal does require actual language changes beyond the current
> introspection options, that should be made clear.
>
> -CHB
>
>
>Is there no room for making it easier to do this with less invasive
changes to the stdlib, or are Steven d'A's "heroic measures in an
import hook" the right way to go?
I'm not familiar with this, can you please elaborate?
>From what I understand we can change stdlib to the point of manipulating
So should I just scratch this and rewrite a PEP for an extensible assertion
mechanism?
On Fri, Sep 24, 2021, at 14:04, Noam Tenne wrote:
> Hi All,
>
> Following the discussions on "Power Assertions: Is it PEP-able?", I've
> drafted this PEP.
> Your comments ar
Thank you
On Sat, Sep 25, 2021, at 18:53, Guido van Rossum wrote:
> First you need to fond a core dev to sponsor you (Steven D’A?). That person
> will guide you through the process.
>
> On Sat, Sep 25, 2021 at 08:30 Noam Tenne wrote:
>> __
>> So should I just scratc
ier to replace _[0] with one(_) than to
be required to name a new variable, and instead of having an operation on
the iterable, change the way I'm assigning to it.
WDYT?
Cheers,
Noam
___
Python-ideas mailing list -- python-ideas@python.org
To
Thanks! It's good to hear that you too find it useful.
Since adding methods to built-in types is much heavier than adding one
function to a module, l suggest keeping this discussion focused on adding
just the one() function to itertools, and see if there is enough support
for this.
Cheers,
12 matches
Mail list logo