Hi,
(I was asked to forward this from the bug tracker)
> We have also run into problems where a task tries to "return" (yield Return())
> from within a try: except Exception: block. Since returning from a coroutine
> is
> roughly equivalent to "raise GeneratorExit", the exception can be caught
Guido van Rossum wrote:
> Well argued. I suggest to go for option (1) -- make GeneratorExit
> inherit from BaseException. We can do this starting 2.6. Feel free to
> upload a patch to bugs.python.org.
It actually took me a while to figure out why this use case was
convincing, when the same idea h
Guido van Rossum wrote:
> This looks good. Please make the appropriate changes to the PEP and to
> PEP 0 to mark it as accepted.
I should get to that in the next day or two. Thanks.
> I think the implementation is fine too (others will have to check it
> more carefully) but I noticed that the pro
Facundo Batista wrote:
> 2007/11/24, Nick Coghlan <[EMAIL PROTECTED]>:
>
>> Did you change the Decimal repr to use the same format for the mantissa?
>
> I don't understand the question. The output of repr() does not show
> this internals...
Yeah, um... can we just forget I asked that question? (
Fred Drake wrote:
> I suspect that's indistinguishable from everyone being tired of the
> discussion, knowing that you're going to pick something reasonable in
> spite of our yammering.
What Fred said. It's Guido's bikeshed, he can choose the colour :)
Just for the record, I also like the ide
Antoine Pitrou schrieb:
> Hi,
>
> (I was asked to forward this from the bug tracker)
>
>> We have also run into problems where a task tries to "return" (yield
>> Return())
>> from within a try: except Exception: block. Since returning from a
>> coroutine is
>> roughly equivalent to "raise Gene
On 2 Dec 2007, at 03:09, Neil Toronto wrote:
> Are there any use-cases for allowing namespace dicts (such as globals,
> builtins and classes) to have non-string keys? I'm asking because I'm
> planning on accelerating method lookups next, and the possibility of a
> key compare changing the underlyi
Hi Antoine,
Antoine Pitrou wrote:
> Hi,
>
> (I was asked to forward this from the bug tracker)
>
>> We have also run into problems where a task tries to "return" (yield
>> Return())
>> from within a try: except Exception: block. Since returning from a
>> coroutine is
>> roughly equivalent to
On Dec 2, 2007 7:40 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Just for the record, I also like the idea of __builtins__ being a magic
> alias for the boringly-but-practically named builtins module.
[Imagine me jumping up and down and screaming at the top of my lungs
out of frustration:]
BUT T
On Dec 2, 2007 11:29 AM, Chad Austin <[EMAIL PROTECTED]> wrote:
> Hi Antoine,
>
> Antoine Pitrou wrote:
> > Hi,
> >
> > (I was asked to forward this from the bug tracker)
> >
> >> We have also run into problems where a task tries to "return" (yield
> >> Return())
> >> from within a try: except Exc
Guido van Rossum schrieb:
> On Dec 2, 2007 7:40 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> Just for the record, I also like the idea of __builtins__ being a magic
>> alias for the boringly-but-practically named builtins module.
>
> [Imagine me jumping up and down and screaming at the top of my
An interesting question has come up in the development of the SSL module.
The function ssl.wrap_socket() takes a flag, do_handshake_on_connect,
which tells it whether to do the SSL handshake before returning an
SSLSocket object to the caller. If the socket being wrapped is
non-blocking, the code
On Sun, Dec 02, 2007 at 12:23:01PM -0800, Bill Janssen wrote:
[skip]
> Or, should I just set the timeout:
>
> timeout = self.gettimeout()
> try:
> self.settimeout(None)
> self.do_handshake()
> finally:
> self.settimeout(timeout)
Yes, this is the correct soluti
Le dimanche 02 décembre 2007 à 12:08 -0800, Neal Norwitz a écrit :
> Note that StandardError was removed from py3k.
Out of curiosity, what is the reason for this? Another exception tree
rearrangement?
___
Python-Dev mailing list
Python-Dev@python.org
Le dimanche 02 décembre 2007 à 11:29 -0800, Chad Austin a écrit :
> If socket.error, xmlrpclib.Fault, httplib.HTTPException, etc. all extended
> StandardError, then we would probably be fine with that approach. But I
> think
> the majority of exceptions, both in the standard library and our co
Nicko van Someren wrote:
> On 2 Dec 2007, at 03:09, Neil Toronto wrote:
>
>> Are there any use-cases for allowing namespace dicts (such as globals,
>> builtins and classes) to have non-string keys? I'm asking because I'm
>> planning on accelerating method lookups next, and the possibility of a
>>
On Sun, Dec 02, 2007, Neil Toronto wrote:
>
> Anyway, report: I've got an initial working attribute cache, using the
> conveniently-named-and-left-NULL tp_cache. It's a nice speedup - except
> on everything the standard benchmarks test, because their class
> hierarchies are very shallow. :p If
On Dec 1, 2007 11:14 PM, Chad Austin <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > On Dec 1, 2007 2:38 PM, Chad Austin <[EMAIL PROTECTED]> wrote:
> >> This problem could be solved in several ways:
> >>
> >> 1) Make GeneratorExit derive from BaseException, just like SystemExit.
> >
> > We
Antoine Pitrou schrieb:
> Le dimanche 02 décembre 2007 à 12:08 -0800, Neal Norwitz a écrit :
>> Note that StandardError was removed from py3k.
>
> Out of curiosity, what is the reason for this? Another exception tree
> rearrangement?
I think it was found not to serve a real purpose.
Georg
--
T
On Dec 2, 2007 1:49 PM, Georg Brandl <[EMAIL PROTECTED]> wrote:
> Antoine Pitrou schrieb:
> > Le dimanche 02 décembre 2007 à 12:08 -0800, Neal Norwitz a écrit :
> >> Note that StandardError was removed from py3k.
> >
> > Out of curiosity, what is the reason for this? Another exception tree
> > rear
Neil Toronto wrote:
> It'd be nice to have a benchmark with a deep class hierarchy. Does
> anybody know of one?
Zope has some very complex and deep class hierarchies, especially when
it comes down to Plone and Archetypes. Unfortunately Zope is still stuck
with Python 2.4.
Christian
_
Bill Janssen wrote:
> What I'd like to do is just use the socket API,
> something like:
>
> blocking = self.getblocking()
> try:
> self.setblocking(1)
> self.do_handshake()
> finally:
> self.setblocking(blocking)
I'm not sure this is the right approach. If the c
> Rather than temporarily
> making it blocking by whatever means, some indication needs
> to be returned that the operation would block, and a way
> provided for the calling code to re-try later.
>
> If that can't reasonably be done, then passing a non-blocking
> socket here should be an error.
I
At 08:09 PM 12/1/2007 -0700, Neil Toronto wrote:
>Are there any use-cases for allowing namespace dicts (such as globals,
>builtins and classes) to have non-string keys?
Yes. See http://pypi.python.org/pypi/AddOns
> I'm asking because I'm
>planning on accelerating method lookups next, and the p
24 matches
Mail list logo