Note that Pablo explicitly requested all feedback to Discourse. On Mon, Jan 10, 2022 at 06:15 Batuhan Taskaya <isidenti...@gmail.com> wrote:
> > While it can indeed, make otherwise stable projects with "nop"s assert > sudden failing, that should be a trivial fix for any non-unmaintained > project. > > Agreed. This would be like a bug fix. I don't think anyone is depending on > the current behavior (beside explicit tests in linters, which is only a > handful (2-3)). +1 to the PEP as well, which I find this restriction > unnecessary. > > On Mon, Jan 10, 2022, 4:20 PM Joao S. O. Bueno <jsbu...@python.org.br> > wrote: > >> >> >> On Mon, 10 Jan 2022 at 08:39, Victor Stinner <vstin...@python.org> wrote: >> >>> Does someone know if linters like pylint or pylakes current warn on >>> "assert(test, msg)" statements? >>> >>> If a project use such assertions which are always true, they can start >>> failing wit the PEP 679, right? >> >> >> OTOH, any assertion which start failing in this way, is a statement which >> _should_ have been failing from the start, and was being ignored up to >> this change. >> >> While it can indeed, make otherwise stable projects with "nop"s assert >> sudden failing, that should be a trivial fix for any non-unmaintained >> project. >> >> +1 to the change >> >> >> >> >>> Hopefully, the fix is easy: removing >>> the parenthesis give the same behavior on old and new Python versions. >>> >>> (it will behave the same just if the first expression is actually truish) >> >> >>> Is it possible to run a code search on PyPI top 5000 projects to see >>> if such always-true assertion is common or not? >>> >>> Victor >>> >>> On Mon, Jan 10, 2022 at 1:22 AM Pablo Galindo Salgado >>> <pablog...@gmail.com> wrote: >>> > >>> > Hi everyone, >>> > >>> > I would like to start a discussion about a small PEP proposal to allow >>> parentheses in >>> > assert statements to fix a common gotcha with assert statements. >>> > >>> > Link to the PEP: https://www.python.org/dev/peps/pep-0679/ >>> > >>> > Please, redirect all discussions to: >>> > >>> > >>> https://discuss.python.org/t/pep-679-allow-parentheses-in-assert-statements/13003 >>> > >>> > as I will not be monitoring answers to this thread. >>> > >>> > Thanks, everyone for your time! >>> > >>> > Regards from cloudy London, >>> > Pablo Galindo Salgado >>> > _______________________________________________ >>> > Python-Dev mailing list -- python-dev@python.org >>> > To unsubscribe send an email to python-dev-le...@python.org >>> > https://mail.python.org/mailman3/lists/python-dev.python.org/ >>> > Message archived at >>> https://mail.python.org/archives/list/python-dev@python.org/message/I7MKCD3GHJXCERFCZ2FD3X7IPAX6ASVK/ >>> > Code of Conduct: http://python.org/psf/codeofconduct/ >>> >>> >>> >>> -- >>> Night gathers, and now my watch begins. It shall not end until my death. >>> _______________________________________________ >>> Python-Dev mailing list -- python-dev@python.org >>> To unsubscribe send an email to python-dev-le...@python.org >>> https://mail.python.org/mailman3/lists/python-dev.python.org/ >>> Message archived at >>> https://mail.python.org/archives/list/python-dev@python.org/message/LFQGI43BH3SWKHRBPO7T3DC6SEU5HMQ3/ >>> Code of Conduct: http://python.org/psf/codeofconduct/ >>> >> _______________________________________________ >> Python-Dev mailing list -- python-dev@python.org >> To unsubscribe send an email to python-dev-le...@python.org >> https://mail.python.org/mailman3/lists/python-dev.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-dev@python.org/message/SFBWV5SAFYRFEASNJZJIRY4VUPIEOX24/ >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > _______________________________________________ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/FOZDTZFT4EGS3UUDF6GGVKA65DF6COH7/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido (mobile)
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/36GLLZYP46CINXWL5QXRWKZ67G7GKJZH/ Code of Conduct: http://python.org/psf/codeofconduct/