[Python-Dev] switching on -3 from within a program?

2008-09-16 Thread Anthon van der Neut
With a minor modification to the Makefile I was able to get mod_wsgi v2.3 to work with python2.6rc1. I promptly got a warning in my apache log files on the depcrecated use of 'sha' in the paste's cookie module, good! And easily fixed. After that I was looking for a way to switch on the -3 warnings

Re: [Python-Dev] switching on -3 from within a program?

2008-09-16 Thread Christian Heimes
Anthon van der Neut wrote: import sys sys.py3kwarning = True x = { 'abc': 1 }; x.has_key('abc') which does not give a warning (starting python2.6 with the -3 option of course does). > Is there anyway to switch this on from within a program with a Python > statement? That doesn't work because "

Re: [Python-Dev] switching on -3 from within a program?

2008-09-16 Thread Benjamin Peterson
On Tue, Sep 16, 2008 at 10:32 AM, Anthon van der Neut <[EMAIL PROTECTED]> wrote: > With a minor modification to the Makefile I was able to get mod_wsgi > v2.3 to work with python2.6rc1. > I promptly got a warning in my apache log files on the depcrecated use > of 'sha' in the paste's cookie module,

Re: [Python-Dev] ',' precedence in documentation]

2008-09-16 Thread Steven D'Aprano
On Tue, 16 Sep 2008 10:50:45 am Greg Ewing wrote: > Steven D'Aprano wrote: > > I was confused about the role of commas, and totally gobsmacked > > when I discovered that commas make tuples everywhere except when > > following an except statement. > > Um... you've never written a function call with

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-16 Thread Giampaolo Rodola'
I've tried to modify my existing asyncore-based code but I'm encountering a lot of different problems I didn't manage to fix. It seems that playing with the do_handshake_on_connect flag doesn't make any difference. I guess that without some kind of documentation describing how to deal with non-bloc

Re: [Python-Dev] ssl module, non-blocking sockets and asyncore integration

2008-09-16 Thread Giampaolo Rodola'
Sorry, ignore my 2nd question, I see now that you already gave a very clear answer in your first message. I change my question: how am I supposed to know when the SSL hanshake is completed? When pending() returns False? If so I'd recommend to document the method. --- Giampaolo http://code.google.