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.

作者 mark.dickinson
收信人 fredrikj, loewis, mark.dickinson, rhettinger, terry.reedy, vstinner
日期 2008-12-12.18:10:44
SpamBayes Score 4.279108e-09
Marked as misclassified
Message-id <1229105446.49.0.825337214884.issue3439@psf.upfronthosting.co.za>
In-reply-to
内容
> I choosed to use consistent result type. But now I would prefer int :-) I see 
> that PyInt_FromSize_t() returns a long if the value doesn't fit in an int. So 
> it's correct.

Cool.  I think int is better, simply because the result is almost always going to fit 
into an int in practice, and because calculations with ints are faster.

> I'm paranoid

Yeah, me too.  I removed the check, but also changed the assert to check that
Py_SIZE is nonzero.

> Can you fix these two issues (use PyInt_FromSize_t and remove the if)?

Done.
历史
日期 用户 动作 参数
2008-12-12 18:10:46mark.dickinson修改recipients: + mark.dickinson, loewis, rhettinger, terry.reedy, vstinner, fredrikj
2008-12-12 18:10:46mark.dickinson修改messageid: <1229105446.49.0.825337214884.issue3439@psf.upfronthosting.co.za>
2008-12-12 18:10:45mark.dickinson链接issue3439 messages
2008-12-12 18:10:45mark.dickinson创建