[Python-Dev] Scour.com invite from Raja Rokkam

2008-08-05 Thread Raja Rokkam
Hey, Did you hear about Scour? It is the next gen search engine with Google/Yahoo/MSN results and user comments all on one page. Best of all we get paid for using it by earning points with every search, comment and vote. The points are redeemable for Visa gift cards! It's like earning credit card

Re: [Python-Dev] urllib.quote and unquote - Unicode issues

2008-08-05 Thread Matt Giuca
Has anyone had time to look at the patch for this issue? It got a lot of support about a week ago, but nobody has replied since then, and the patch still hasn't been assigned to anybody or given a priority. I hope I've complied with all the patch submission procedures. Please let me know if there

[Python-Dev] [OT] Commit number

2008-08-05 Thread Facundo Batista
Congratulations to Andrew Kuchling for doing the commit # 2**16 Lover-of-round-numbers--ly yours, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] New to python, let me know if i should be posting somewhere else

2008-08-05 Thread jamesz
Hi, I am new to Python, so this question that is probably blindingly obvious to you all. If I have 2 classes that references each other (a circular reference of some sort) and both class are defined in the single file in the order shown. class Resume(db.Model): file_data =

Re: [Python-Dev] New to python, let me know if i should be posting somewhere else

2008-08-05 Thread Steve Holden
jamesz wrote: Hi, I am new to Python, so this question that is probably blindingly obvious to you all. If I have 2 classes that references each other (a circular reference of some sort) and both class are defined in the single file in the order shown. class Resume(db.Model):

Re: [Python-Dev] urllib.quote and unquote - Unicode issues

2008-08-05 Thread Guido van Rossum
After the most recent flurry of discussion I've lost track of what's the right thing to do. I also believe it was said it should wait until 2.7/3.0, so there's no hurry (in fact there's no way to check it -- we don't have branches for those versions yet). On Tue, Aug 5, 2008 at 5:47 AM, Matt

[Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Paul Pogonyshev
Hi, Sorry if this topic was discussed before, but I couldn't find. Py_CLEAR documentation explains why it is better than Py_DECREF and NULL assignment. However, I don't understand why there is no similar macro for the case you want to replace one object with another? I.e. 'naive' way:

[Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

2008-08-05 Thread Leo Soto M.
Hi Python developers! First, a quick introduction: My name is Leonardo Soto, I'm a GSoC 2008 student working under PSF and the Jython project, and a Jython commiter since one month ago. As part of what I did on this GSoC, I've improved Jython's __cmp__ a bit. That made me go to look at CPython

Re: [Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

2008-08-05 Thread Guido van Rossum
Given that in Python 3.0 __cmp__ is going away, I'm not sure how much it all matters -- but if you care, as long as it's supported at all, you might as well strive for the most compatibility with 2.5... On Tue, Aug 5, 2008 at 1:43 PM, Leo Soto M. [EMAIL PROTECTED] wrote: Hi Python developers!

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Guido van Rossum
I don't see a way that __del__ could be invoked and access the NULL between the Py_CLEAR() call and the Py_INCREF() call in the second version. On Tue, Aug 5, 2008 at 1:38 PM, Paul Pogonyshev [EMAIL PROTECTED] wrote: Hi, Sorry if this topic was discussed before, but I couldn't find. Py_CLEAR

Re: [Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

2008-08-05 Thread Guido van Rossum
On Tue, Aug 5, 2008 at 1:56 PM, Leo Soto M. [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 4:45 PM, Guido van Rossum [EMAIL PROTECTED] wrote: Given that in Python 3.0 __cmp__ is going away, I'm not sure how much it all matters -- but if you care, as long as it's supported at all, you might as

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Daniel Stutzbach
On Tue, Aug 5, 2008 at 3:38 PM, Paul Pogonyshev [EMAIL PROTECTED] wrote: Py_CLEAR way: Py_CLEAR (self-x); /* But __del__ can now in principle trigger access to NULL. */ self-x = y; Py_INCREF (self-x); The Py_DECREF inside the Py_CLEAR may call arbitrary code

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Paul Pogonyshev
Daniel Stutzbach wrote: On Tue, Aug 5, 2008 at 3:38 PM, Paul Pogonyshev [EMAIL PROTECTED] wrote: Py_CLEAR way: Py_CLEAR (self-x); /* But __del__ can now in principle trigger access to NULL. */ self-x = y; Py_INCREF (self-x); The Py_DECREF inside the

Re: [Python-Dev] urllib.quote and unquote - Unicode issues

2008-08-05 Thread Matt Giuca
After the most recent flurry of discussion I've lost track of what's the right thing to do. I also believe it was said it should wait until 2.7/3.0, so there's no hurry (in fact there's no way to check it -- we don't have branches for those versions yet). I assume you mean 2.7/3.1. I've

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Antoine Pitrou
Paul Pogonyshev pogonyshev at gmx.net writes: Right. But wouldn't it be easier if there was a standard Python macro for this, sort of like proposed Py_ASSIGN? I proposed something similar in http://bugs.python.org/issue3081. ___ Python-Dev

Re: [Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

2008-08-05 Thread Leo Soto M.
On Tue, Aug 5, 2008 at 4:59 PM, Guido van Rossum [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 1:56 PM, Leo Soto M. [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 4:45 PM, Guido van Rossum [EMAIL PROTECTED] wrote: Given that in Python 3.0 __cmp__ is going away, I'm not sure how much it all

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Greg Ewing
Paul Pogonyshev wrote: del obj.x obj.x = y though I'm not sure if for Python code x.__del__ will see obj.x as non-set attribute (I guess so, but I'm not sure). A quick experiment suggests that it does: Python 2.5 (r25:51908, Apr 8 2007, 22:22:18) [GCC 3.3 20030304 (Apple

Re: [Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

2008-08-05 Thread Guido van Rossum
On Tue, Aug 5, 2008 at 5:56 PM, Leo Soto M. [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 4:59 PM, Guido van Rossum [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 1:56 PM, Leo Soto M. [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 4:45 PM, Guido van Rossum [EMAIL PROTECTED] wrote: Given

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Daniel Stutzbach
On Tue, Aug 5, 2008 at 4:30 PM, Paul Pogonyshev [EMAIL PROTECTED] wrote: Generally, I end up storing all the objects to be Py_DECREF'd in temporary variables and doing the Py_DECREF's just before returning. That way, self is never in an inconsistent state. Right. But wouldn't it be

Re: [Python-Dev] urllib.quote and unquote - Unicode issues

2008-08-05 Thread Bill Janssen
I'm far less concerned about the decision with regards to unquote_to_bytes/quote_from_bytes, as those are new features which can wait. Forgive me, but those are the *old* features, which must be there. Bill ___ Python-Dev mailing list