[IronPython] Trying to set methods on "built-in" classes failssilently

Keith J. Farmer kfarmer at thuban.org
Fri Jan 13 05:02:33 CET 2006


Standard practice or not, this begs the question of whether it should be allowed at all.  I would argue against it:
* security issue
* silent fails mask unexpected behavior
 
However, adding *new* members doesn't, to my knowledge, present a security risk.  As a comparison, MSH allows new members and aliases to be overlayed on top of existing types, but I don't know whether or not it chokes when attempting to override an existing member.  It may be worthwhile to agree with the MSH team on a strategy.

________________________________

From: users-bounces at lists.ironpython.com on behalf of Giles Thomas
Sent: Thu 1/12/2006 1:35 PM


I suspect it's not something anyone's likely to come across often, but
if you try to rebind a method on a built-in class,  no exception will be
thrown but it will not be changed.  An example:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4203 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060112/b5985fba/attachment.bin>


More information about the Ironpython-users mailing list