[Python-Dev] Weekly Python Patch/Bug Summary

2007-01-19 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 423 open ( +2) / 3539 closed ( +9) / 3962 total (+11) Bugs: 960 open ( -3) / 6446 closed (+20) / 7406 total (+17) RFE : 258 open ( +3) / 249 closed ( +3) / 507 total ( +6) New / Reopened Patches __ Add alias

Re: [Python-Dev] Floor division

2007-01-19 Thread Tim Peters
[Raymond Hettinger] > I bumped into an oddity today: > > 6.0 // 0.001 != math.floor(6.0 / 0.001) > > In looking at Objects/floatobject.c, I was surprised to find that > float_floor_division() is implemented in terms of float_divmod(). Does anyone > know why it takes such a circuitous path? I

Re: [Python-Dev] Floor division

2007-01-19 Thread Guido van Rossum
Probably because I tend not to know what I'm doing when numerics are concerned. :-( On 1/19/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > I bumped into an oddity today: > > 6.0 // 0.001 != math.floor(6.0 / 0.001) > > In looking at Objects/floatobject.c, I was surprised to find that > floa

[Python-Dev] Floor division

2007-01-19 Thread Raymond Hettinger
I bumped into an oddity today: 6.0 // 0.001 != math.floor(6.0 / 0.001) In looking at Objects/floatobject.c, I was surprised to find that float_floor_division() is implemented in terms of float_divmod(). Does anyone know why it takes such a circuitous path? I had expected something simpler

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Martin v. Löwis
Josiah Carlson schrieb: > I was saying that it would be nice if the following were true: > > >>> encodings.__module__ > Ah, ok. It would be somewhat confusing, though, that __module__ is sometimes a module object, and sometimes a string (it certainly confused me). > So what if it is a c

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Brett Cannon
On 1/19/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2007-01-19 22:33, Brett Cannon wrote: > >> That's a typical error situation you get in __del__ methods at > >> the time the interpreter is shut down. > >> > > > > Yeah, but in this case this is at the end of Py_Initialize() for the > > stuff

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread M.-A. Lemburg
On 2007-01-19 22:33, Brett Cannon wrote: >> That's a typical error situation you get in __del__ methods at >> the time the interpreter is shut down. >> > > Yeah, but in this case this is at the end of Py_Initialize() for the > stuff I am doing to the interpreter. =) Is that in some error branch

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Brett Cannon
On 1/18/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Brett Cannon schrieb: > > Anybody have any ideas on how to deal with this short of rewriting > > some codecs stuff so that they don't depend on global state in the > > module or just telling me to just live with it? > > There is an old patc

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Brett Cannon
On 1/19/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2007-01-18 20:53, Brett Cannon wrote: > > I have discovered an issue relating to func_globals for functions and > > the deallocation of the module it is contained within. Let's say you > > store a reference to the function encodings.search_

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Josiah Carlson schrieb: > > Seems to me like a bug, but the bug could be fixed if the module's > > dictionary kept a (circular) reference to the module object. Who else > > has been waiting for a __module__ attribute? > > This is the time machine

Re: [Python-Dev] Deletion order when leaving a scope?

2007-01-19 Thread Michael Hudson
Nick Coghlan <[EMAIL PROTECTED]> writes: > Neil Toronto wrote: >> I imagine this would be important to someone expecting system resources >> to be cleaned up, closed, deallocated, or returned inside of __del__ >> methods. Someone coming from C++ might expect LIFO behavior because >> common idio

[Python-Dev] BangPycon 2007 - First Indian Python Conference : Call for Participation

2007-01-19 Thread Anush Shetty
Hi, The BangPypers (Bangalore Python Users Group) invite you to submit a proposal to present a technical paper or tutorial, or to host a meeting or BOF session at the first Indian Python conference here at St Josephs PG College Auditorium in Bangalore,India on March 3rd,2007. There are no fixed g

Re: [Python-Dev] Deletion order when leaving a scope?

2007-01-19 Thread Nick Coghlan
Neil Toronto wrote: > I imagine this would be important to someone expecting system resources > to be cleaned up, closed, deallocated, or returned inside of __del__ > methods. Someone coming from C++ might expect LIFO behavior because > common idioms like RAII (Resource Allocation Is Instantiati

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread M.-A. Lemburg
On 2007-01-18 20:53, Brett Cannon wrote: > I have discovered an issue relating to func_globals for functions and > the deallocation of the module it is contained within. Let's say you > store a reference to the function encodings.search_function from the > 'encodings' module (this came up in C cod