This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erik.bray
Recipients berker.peksag, bignose, brett.cannon, carljm, erik.bray, fov, kevinbenton, kushal.das, michael.foord, poke, rbcollins, ztane
Date 2015-07-28.18:20:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438107638.96.0.699216661408.issue24651@psf.upfronthosting.co.za>
In-reply-to
Content
Would it be possible to add the functions and *not* deprecate assert_ methods?

The existing solution is still acknowledged to be an incomplete solution.  It is still possible to make other typos that result in unintentional non-assertions (it's also not entirely clear from the docs when one would want to set unsafe=True, though at least the default unsafe=False is better).  I'm not against the existing solution--I think it's reasonable and that calls of "special cases yadda yadda" are unfair. Sometimes practicality beats purity.

So, although adding assert_ functions would be a bit redundant, it's also guaranteed safer, and so probably worth making an exception for.  

There's a tradeoff here between convenience and robustness and I think we can have it both ways.  If I were to write new tests using Mock I would probably define such functions myself, but that would get repetitive quickly.
History
Date User Action Args
2015-07-28 18:20:39erik.braysetrecipients: + erik.bray, brett.cannon, rbcollins, carljm, michael.foord, poke, bignose, berker.peksag, kushal.das, ztane, fov, kevinbenton
2015-07-28 18:20:38erik.braysetmessageid: <1438107638.96.0.699216661408.issue24651@psf.upfronthosting.co.za>
2015-07-28 18:20:38erik.braylinkissue24651 messages
2015-07-28 18:20:38erik.braycreate