Nick Coghlan wrote:
> from contextlib import closing
>
> with closing(itr):
># Use the iterator in here as you wish
># secure in the knowledge it will be
># cleaned up promptly when you are done
># whether it is a file, a generator or
># something with a database connection
>
Greg Ewing wrote:
> Nick Coghlan wrote:
>
>> Generators are even more special, in that they only require finalisation in
>> the first place if they're stopped on a yield statement inside a try-finally
>> block.
>
> I find it rather worrying that there could be a
> few rare cases in which my gen
Jim Jewett wrote:
> Nick Coghlan wrote:
>
>> [ much good, including the @instance decorator ]
>
>> P.S. If all you want is somewhere to store mutable
>> state between invocations, you can always use the
>> function's own attribute space
>
> >>> def f(): print "Hi world from %s!" % f
>
>
Nick Coghlan wrote:
> Generators are even more special, in that they only require finalisation in
> the first place if they're stopped on a yield statement inside a try-finally
> block.
I find it rather worrying that there could be a
few rare cases in which my generators cause
memory leaks, thr
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Wasn't my intention.
Good ;-)
> gmane is black magic to me (I've never used it) so I can't be much
> help debugging this... I did add 3 new admins and changed the list
> password.
Since one of the last messages I
Duncan Booth wrote:
> Surely if you have a cycle what you want to do is to pick just *one* of the
> objects in the cycle and break the link which makes it participate in the
> cycle.
No, I really meant to do them all. I was trying to avoid creating an
attractive nuisance. In
http://mail.python.o
On Fri, 2006-03-31 at 15:13 -0500, Terry Reedy wrote:
> For about a week, I have been reading and occasionally posting to the new
> pydev-3000 mailing list via the gmane mirror gmane.comp.lang.devel.3000.
> Today, it has disappeared and was still gone after reloading their
> newsgroup list. Was
Robert Kern wrote:
> FWIW: Trac has a Sourceforge bug tracker import script:
>
> http://projects.edgewall.com/trac/browser/trunk/contrib/sourceforge2trac.py
>
> Apologies: for the other blank reply.
That isn't actually worth that much: somebody would need to operate it,
too. Mere existence doesn
Terry> For about a week, I have been reading and occasionally posting to
Terry> the new pydev-3000 mailing list via the gmane mirror
Terry> gmane.comp.lang.devel.3000. Today, it has disappeared and was
Terry> still gone after reloading their newsgroup list. Was this
Terry> in
Nick Coghlan wrote:
> [ much good, including the @instance decorator ]
> P.S. If all you want is somewhere to store mutable
> state between invocations, you can always use the
> function's own attribute space
>>> def f(): print "Hi world from %s!" % f
>>> f()
Hi world from !
Not r
Wasn't my intention.
gmane is black magic to me (I've never used it) so I can't be much
help debugging this... I did add 3 new admins and changed the list
password.
--Guido
On 3/31/06, Terry Reedy <[EMAIL PROTECTED]> wrote:
> For about a week, I have been reading and occasionally posting to the
For about a week, I have been reading and occasionally posting to the new
pydev-3000 mailing list via the gmane mirror gmane.comp.lang.devel.3000.
Today, it has disappeared and was still gone after reloading their
newsgroup list. Was this intentional on the part of the mail list
maintainers?
On 3/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Brett Cannon wrote:
>
> > Same here. Please move any more comments about infrastructure to the
> > infrastructure list
> > (http://mail.python.org/mailman/listinfo/infrastructure/). But
> > do realize the committee is not discussing trackers
On Friday 31 March 2006 11:52, Phillip J. Eby wrote:
> class bar:
> @class foo
> def __init___(...):
> ...
The more I think about it, the more I like the "@class foo" syntax. The
existing syntax for functions doesn't have anything between the decorators
a
At 12:14 PM 3/31/2006 -0500, Tim Peters wrote:
>[Phillip J. Eby]
> > ...
> > As Tim suggested, it'd be better to have the code be generator-specific, at
> > least for now. That had actually been my original plan, to make it
> > generator-specific, but I was afraid of breaking encapsulation in the
[Phillip J. Eby]
> ...
> As Tim suggested, it'd be better to have the code be generator-specific, at
> least for now. That had actually been my original plan, to make it
> generator-specific, but I was afraid of breaking encapsulation in the
> garbage collector by having it know about generators.
At 11:27 PM 3/31/2006 +1000, Nick Coghlan wrote:
>Generators are even more special, in that they only require finalisation in
>the first place if they're stopped on a yield statement inside a try-finally
>block.
Or a try-except block. Or a 'with' statement. It's only loop blocks that
are exempt
At 04:47 AM 3/31/2006 -0800, Michael Chermside wrote:
>In the discussion over class decorators, Jim Jewett writes:
> > I have often started with a function, and ended up replacing it with a
> > callable object so that I could save state without resorting to
> > "defalt args" or worse.
> >
> > I wou
[Neal Norwitz]
"""
test_bsddb3
Exception in thread reader 4:
Traceback (most recent call last):
File "/home/neal/python/trunk/Lib/threading.py", line 473, in __bootstrap
self.run()
File "/home/neal/python/trunk/Lib/threading.py", line 453, in run
self.__target(*self.__args, **self.__kwa
On 3/1/06, Neal Norwitz <[EMAIL PROTECTED]> wrote:
> test_bsddb3
> Exception in thread reader 4:
> Traceback (most recent call last):
> File "/home/neal/python/trunk/Lib/threading.py", line 473, in __bootstrap
> self.run()
> File "/home/neal/python/trunk/Lib/threading.py", line 453, in run
I just created a snapshot MSI release from the trunk
(I actually recreated the 25a0 tag for that, to find that
subversion will not update $HeadURL$ automatically when
switching branches).
Please find the file at
http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.5.13238.msi
Regards,
Martin
Michael Chermside wrote:
> In the discussion over class decorators, Jim Jewett writes:
>> I have often started with a function, and ended up replacing it with a
>> callable object so that I could save state without resorting to
>> "defalt args" or worse.
>>
>> I would prefer to decorate these exact
Georg Brandl wrote:
> Hi,
>
> some time ago, someone posted in python-list about icons using the Python
> logo from the new site design [1]. IMO they are looking great and would
> be a good replacement for the old non-scaling snakes on Windows in 2.5.
Those are *really* pretty. And the self-refer
On 3/31/06, Jim Jewett <[EMAIL PROTECTED]> wrote:
The checkins list has been struggling with generator reference leaks;the latest conclusion was that some are unavoidable because of __del__cycles. That was Tim's conclusion, but I wasn't quite done thinking about it ;)
That sort of defeats the purp
Duncan Booth wrote:
> Surely if you have a cycle what you want to do is to pick just *one* of the
> objects in the cycle and break the link which makes it participate in the
> cycle. That should be sufficient to cause the rest of the cycle to collapse
> with __del__ methods being called from the
In the discussion over class decorators, Jim Jewett writes:
> I have often started with a function, and ended up replacing it with a
> callable object so that I could save state without resorting to
> "defalt args" or worse.
>
> I would prefer to decorate these exactly like the functions they repla
Taro Ogawa gmail.com> writes:
> Nick Coghlan gmail.com> writes:
> > There are three big use cases:
> > ...
>
> ...
Apologies - this was posted via gmane and the post I responded to appeared in
the gmane.comp.python.devel.3000 tree... I'll repost there (and check gmane a
little more carefully i
Hi,
some time ago, someone posted in python-list about icons using the Python
logo from the new site design [1]. IMO they are looking great and would
be a good replacement for the old non-scaling snakes on Windows in 2.5.
While we're at it, Python (and IDLE) .desktop files could be added to the
d
Martin v. Löwis wrote:
> Neal Norwitz wrote:
>> See http://python.org/sf/1454485 for the gory details. Basically if
>> you create a unicode array (array.array('u')) and try to append an
>> 8-bit string (ie, not unicode), you can crash the interpreter.
>>
>> The problem is that the string is conver
Martin v. Löwis wrote:
> Terry Reedy wrote:
>
>>"Gerhard Häring" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>
>>>I proposed to link dynamically on Windows, and ship the Windows
>>>SQLite3.DLL. This has two advantages:
>>>
>>>- Python users can upgrade the SQLite3.DLL by a simp
"Jim Jewett" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> As a strawman proposal:
>
> deletes = [(obj.__del__.cycle, obj) for obj in cycle
> if hasattr(obj, "__del__") and
> hasattr(obj.__del__, "cycle")]
> deletes.sort()
> for (cycle, obj) in dele
31 matches
Mail list logo