On 6/30/06, <b class="gmail_sendername">Armin Rigo</b> <<a href="mailto:arigo@tunes.org">arigo@tunes.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Brett,<br><br>On Thu, Jun 29, 2006 at 11:48:36AM -0700, Brett Cannon wrote:<br>> 1) Is removing 'file' from the builtins dict in PyInterpreterState (and<br>> maybe some other things) going to be safe enough to sufficiently hide 'file'
<br>> confidently (short of someone being stupid in their C extension module and<br>> exposing 'file' directly)?<br><br>No.<br><br> >>> object.__subclasses__()<br> [..., <type 'file'>]<br><br>Maybe this one won't work if __subclasses__ is forbidden, but in general
<br>I think there *will* be a way to find this object.</blockquote><div><br><br>Yeah, that's been my (what I thought was paranoid) feeling. Glad I am not the only one who thinks that hiding file() is near impossible.<br>
</div><br>-Brett</div>