Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67980

Assertions are bad, m'kay?

Date 2014-03-07 18:16 +1100
Subject Assertions are bad, m'kay?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.7890.1394176617.18130.python-list@python.org> (permalink)

Show all headers | View raw


They produce the wrong exception type, they disappear when you least
expect them, and now we have another reason not to use assert.

http://xkcd.com/1339/

Abusing assert for arg checking violates XKCD 1339. Write
standards-compliant code!

ChrisA

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Assertions are bad, m'kay? Chris Angelico <rosuav@gmail.com> - 2014-03-07 18:16 +1100
  Re: Assertions are bad, m'kay? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-07 11:11 +0000
    Re: Assertions are bad, m'kay? Chris Angelico <rosuav@gmail.com> - 2014-03-07 22:24 +1100
    Re: Assertions are bad, m'kay? Dan Stromberg <drsalists@gmail.com> - 2014-03-07 16:15 -0800
      Re: Assertions are bad, m'kay? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-03-08 01:26 +0100
      Re: Assertions are bad, m'kay? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-08 14:44 +0000
    Re: Assertions are bad, m'kay? Ben Finney <ben+python@benfinney.id.au> - 2014-03-08 11:22 +1100

csiph-web