Message65311
The asserts can go. I left them in figuring a crashing interpreter on a
debug build in someones sandbox or on a buildbox would get more
attention than a SystemError being raised. I doubt that is a worthy
assumption on my part.
Both a crash and a SystemError are notable events.
shall I get rid of the asserts?
As for why i dislike signed size types... tons of reasons:
* It wastes half the range of the integer.
* It leads to security bugs.
* on return values -1 and < 0 tests may be convenient to type but they
could just as easily compare to a known value defined as a constant;
all the things alexander belopolsky suggested.
* sizes being passed -in- to a function never need to be negative
meaning safe code requires extra checks like these.
* sign extension of values going between registers of different sizes
is needlessly expensive on some cpu architectures. use unsigned
types whenever possible for the best code.
anyways, I figure the Python C API is already set in stone using the
signed types so its too late to "fix" it without causing headaches
around the world. |
|
| Date |
User |
Action |
Args |
| 2008-04-10 19:28:02 | gregory.p.smith | set | spambayes_score: 0.0115574 -> 0.0115574 recipients:
+ gregory.p.smith, gvanrossum, amaury.forgeotdarc, belopolsky, chmod007, jnferguson |
| 2008-04-10 19:28:02 | gregory.p.smith | set | spambayes_score: 0.0115574 -> 0.0115574 messageid: <1207855682.32.0.185446525619.issue2587@psf.upfronthosting.co.za> |
| 2008-04-10 19:27:57 | gregory.p.smith | link | issue2587 messages |
| 2008-04-10 19:27:56 | gregory.p.smith | create | |
|