Re: [Python-Dev] sys.setdefaultencoding() vs. csv module + unicode

2007-06-13 Thread Martin v. Löwis
> The csv module says it's not unicode safe but the 2.5 docs [3] have a > workaround for this. While the workaround says nothing about > sys.setdefaultencoding() it simply does not work with the default > encoding, "ascii." Is this _the_ problem with the csv module? Should > I give up and use XM

Re: [Python-Dev] [RFC] urlparse - parse query facility

2007-06-13 Thread Fred L. Drake, Jr.
On Tuesday 12 June 2007, Senthil Kumaran wrote: > This mail is a request for comments on changes to urlparse module. We > understand that urlparse returns the 'complete query' value as the query > component and does not > provide the facilities to separate the query components. User will have t

Re: [Python-Dev] [RFC] urlparse - parse query facility

2007-06-13 Thread O.R.Senthil Kumaran
* Jim Jewett <[EMAIL PROTECTED]> [2007-06-13 19:27:24]: > > a) import cgi and call cgi module's query_ps. [circular imports] > > or > > > b) Implement a stand alone query parsing facility in urlparse *AS IN* > > cgi module. > > Assuming (b), please remove the (code for the) parsing from the

Re: [Python-Dev] 2.5 slower than 2.4 for some things?

2007-06-13 Thread ocean
> > Probably I found one reason comparation for classic style class is slower on > > Python2.5. > > Comparation function instance_compare() calls PyErr_GivenExceptionMatches(), > > and it was just flag operation on 2.4. But on 2.5, probably related to > > introduction of BaseException, > > it check

[Python-Dev] [RFC] urlparse - parse query facility

2007-06-13 Thread Jim Jewett
> a) import cgi and call cgi module's query_ps. [circular imports] or > b) Implement a stand alone query parsing facility in urlparse *AS IN* > cgi module. Assuming (b), please remove the (code for the) parsing from the cgi module, and just import it back from urlparse (or urllib). Since cgi a

Re: [Python-Dev] 2.5 slower than 2.4 for some things?

2007-06-13 Thread Neal Norwitz
On 6/13/07, ocean <[EMAIL PROTECTED]> wrote: > > Meanwhile I tried to replace the parsing I did with Plex by re.Scanner. > And > > again there is a remarkable speed difference. Again python2.5 is slower: > > > > try: > > from re import Scanner > > except: > > from sre import Scanner > > > >

[Python-Dev] sys.setdefaultencoding() vs. csv module + unicode

2007-06-13 Thread Kumar McMillan
I'm seeing conflicting opinions on whether to put sys.setdefaultencoding('utf-8') in sitecustomize.py or not ([1] vs. [2]) and frankly I'm confused. The csv module says it's not unicode safe but the 2.5 docs [3] have a workaround for this. While the workaround says nothing about sys.setdefaultenc

Re: [Python-Dev] 2.5 slower than 2.4 for some things?

2007-06-13 Thread ocean
> Meanwhile I tried to replace the parsing I did with Plex by re.Scanner. And > again there is a remarkable speed difference. Again python2.5 is slower: > > try: > from re import Scanner > except: > from sre import Scanner > > pars = {} > order = [] > count = 0 > > def par(scanner,name): >

Re: [Python-Dev] TLSAbruptCloseError

2007-06-13 Thread Jon Ribbens
On Tue, Jun 05, 2007 at 12:55:07PM -0400, Todd Hopfinger wrote: >I am using TLS Lite and J2ME SecureConnection for the purposes of >encrypting traffic to/from a Java Midlet client and a multithreaded Python >server. However, I encounter a TLSAbruptCloseError. I have tried to >determ

Re: [Python-Dev] Instance variable access and descriptors

2007-06-13 Thread Armin Rigo
Hi, On Tue, Jun 12, 2007 at 08:10:26PM +1200, Greg Ewing wrote: > Rather than spend time tinkering with the lookup order, > it might be more productive to look into implementing > a cache for attribute lookups. See patch #1700288. Armin ___ Python-Dev