PEP new assert idiom
niels_bohr at uol.com.br
Sun Nov 7 02:58:30 CET 2004
> I see two difficulties with it.
> First, you can do the same thing (I think) with a
> try block around a sequence of statements and
> an assert in the except block. This means you
> will need a fairly strong use case based on
> convenience to add the syntax to the language.
> You will have to show that it will be used a lot.
I meant expression instead of statement, sorry, that's my fault. It's a
minor cosmetic change I should say, only to avoid long grouping of
expressions with an 'and' operator. It's better expressed as: let the
commas take the place of 'and' in assertion verifications... Maybe that
could be extended to other parts of the language, but the only place I
think it would be useful is in assertion statements.
More information about the Python-list