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.

作者 ehuss
收信人 alexandre.vassalotti, belopolsky, brett.cannon, ehuss, facundobatista, georg.brandl, gvanrossum, jafo, jarpa, kylev, loewis, nnorwitz, tseaver, zseil
日期 2010-06-30.03:04:11
SpamBayes Score 1.1402334e-06
Marked as misclassified
Message-id <1277867054.64.0.14729723797.issue1692335@psf.upfronthosting.co.za>
In-reply-to
内容
Alexander, the use case I was involved with was an RPC system which allowed exceptions to propagate over the connection.  In this case, you do not have absolute control over which exceptions may be raised, or who wrote the code that is raising the exception.  There are many cases, even in the standard library, where people do not pass all arguments to the base exception class.  Some of these are probably mistakes, but in general pickle shouldn't fail on otherwise legitimate objects.

There are other cases where passing all arguments up is not wanted, or at least cumbersome.  If you have multiple levels of inheritance, and subclasses add additional arguments to the init, they wouldn't have a way to include those arguments to the base class unless all classes were written with *args in the init function, which many people would not know or remember to do.
历史
日期 用户 动作 参数
2010-06-30 03:04:15ehuss修改recipients: + ehuss, gvanrossum, loewis, nnorwitz, brett.cannon, georg.brandl, facundobatista, jafo, tseaver, belopolsky, zseil, alexandre.vassalotti, jarpa, kylev
2010-06-30 03:04:14ehuss修改messageid: <1277867054.64.0.14729723797.issue1692335@psf.upfronthosting.co.za>
2010-06-30 03:04:12ehuss链接issue1692335 messages
2010-06-30 03:04:11ehuss创建