A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-June/036145.html below:

[Python-Dev] towards a faster Python

[Python-Dev] towards a faster PythonDavid Ascher DavidA@ActiveState.com
Tue, 10 Jun 2003 10:30:51 -0700
Barry Warsaw wrote:

>On Tue, 2003-06-10 at 10:36, Neil Schemenauer wrote:
>
>  
>
>>What I mean by reassigning builtins is:
>>
>>    import __builtin__
>>    __builtin__.int = something
>>    
>>
>
>IMO the only defensible reason to do that is for debugging purposes. 
>Although I haven't had a need for this in many years, it has
>occasionally been useful to reassign built-in open() to catch or log a
>particular file action.  (IIRC, the last time I did this was before the
>resulting IOError included the filename argument.)
>
I've done it to find out how often and when open() is called in a large 
application.

>A warning is fine -- even desirable.  I'd want to make sure such
>debugging hacks didn't make it into a release. :)
>  
>
In this case too, I wouldn't mind warnings.  I would mind it if I had to 
hack my libc to track python-level open() calls =).

--david




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4