Re: [Python-Dev] Matrix product
Cesare Di Mauro wrote: Nick Coghlan write: Sebastien Loisel wrote: Dear Raymond, Thank you for your email. I think much of this thread is a repeat of conversations that were held for PEP 225: http://www.python.org/dev/peps/pep-0225/ That PEP is marked as deferred. Maybe it's time to bring it back to life. This is a much better PEP than the one I had found, and would solve all of the numpy problems. The PEP is very well thought-out. A very interesting read! I wouldn't support some of the more exotic elements tacked on to the end (particularly the replacement of the now thoroughly entrenched bitwise operators), but the basic idea of providing ~op variants of several operators seems fairly sound. I'd be somewhat inclined to add ~not, ~and and ~or to the list even though that would pretty much force the semantics to be elementwise for the ~ variants (since the standard not, and and or are always objectwise and without PEP 335 there's no way for an object to change that). Cheers, Nick. I agree: adding ~op will be very interesting. As interesting as I may have found it though, further discussion of the prospect of resurrecting it for consideration in the 2.7/3.1 timeframe should really take place on python-ideas. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] 3.0 C API to decode bytes into unicode?
I cannot see how I implement decode() for bytes objects using the C API for PyCXX library, I'd assuming that I should find a PyBytes_Decode function but cannot find it in beta 2. What is the preferred way to do this? Barry ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Looking for the email addresses of some committers
On Thu, Jul 31, 2008 at 07:20:15PM -0700, Brett Cannon wrote: > * Jackilyn Hoxworth She was a Google SoC person in 2006; since she hasn't done anything subsequently, her commit privs can be revoked. --amk ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 3.0 C API to decode bytes into unicode?
On Fri, Aug 1, 2008 at 8:06 AM, Barry Scott <[EMAIL PROTECTED]> wrote: > I cannot see how I implement decode() for bytes objects using the C API > for PyCXX library, > > I'd assuming that I should find a PyBytes_Decode function but cannot find it > in beta 2. > > What is the preferred way to do this? PyObject_CallMethod(bytesobj, "decode", "") PyUnicode_FromEncodedObject takes an encoding argument. > > Barry > > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/musiccomposition%40gmail.com > -- Cheers, Benjamin Peterson "There's no place like 127.0.0.1." ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 3.0 C API to decode bytes into unicode?
On 2008-08-01 15:06, Barry Scott wrote: I cannot see how I implement decode() for bytes objects using the C API for PyCXX library, I'd assuming that I should find a PyBytes_Decode function but cannot find it in beta 2. What is the preferred way to do this? PyUnicode_FromEncodedObject() should to the trick. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 01 2008) >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 3.0 C API to decode bytes into unicode?
Benjamin Peterson wrote: > On Fri, Aug 1, 2008 at 8:06 AM, Barry Scott <[EMAIL PROTECTED]> wrote: >> I cannot see how I implement decode() for bytes objects using the C API >> for PyCXX library, >> >> I'd assuming that I should find a PyBytes_Decode function but cannot find it >> in beta 2. >> >> What is the preferred way to do this? > > PyObject_CallMethod(bytesobj, "decode", "") > > PyUnicode_FromEncodedObject takes an encoding argument. There is also PyCodec_Decode() but it does not seem to be documented, nor is any function declared in codecs.h. Is it part of the public API? -- Amaury Forgeot d'Arc ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 3.0 C API to decode bytes into unicode?
On 2008-08-01 15:38, Amaury Forgeot d'Arc wrote: Benjamin Peterson wrote: On Fri, Aug 1, 2008 at 8:06 AM, Barry Scott <[EMAIL PROTECTED]> wrote: I cannot see how I implement decode() for bytes objects using the C API for PyCXX library, I'd assuming that I should find a PyBytes_Decode function but cannot find it in beta 2. What is the preferred way to do this? PyObject_CallMethod(bytesobj, "decode", "") PyUnicode_FromEncodedObject takes an encoding argument. There is also PyCodec_Decode() but it does not seem to be documented, nor is any function declared in codecs.h. Is it part of the public API? Yes, of course. I guess I never got around to writing docs for it at the time. This should basically just be a matter of converting the header file codecs.h into ReST. The APIs are all documented in that header file. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 01 2008) >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Summary of Python tracker Issues
ACTIVITY SUMMARY (07/25/08 - 08/01/08) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1951 open (+21) / 13354 closed (+15) / 15305 total (+36) Open issues with patches: 615 Average duration of open issues: 715 days. Median duration of open issues: 1628 days. Open Issues Breakdown open 1937 (+20) pending14 ( +1) Issues Created Or Reopened (37) ___ csv.DictReader inconsistency 07/30/08 http://bugs.python.org/issue3436reopened ncoghlan patch itertools.izip_longest docs don't specify default fillvalue 07/25/08 CLOSED http://bugs.python.org/issue3447created alecu patch Multi-process 2to3 07/25/08 http://bugs.python.org/issue3448created nedds patch Update decimal module to version 1.68 of the IBM specification 07/25/08 CLOSED http://bugs.python.org/issue3449created marketdickinson patch Buy stocks now to make money 07/26/08 CLOSED http://bugs.python.org/issue3450created nobody Asymptotically faster divmod and str(long) 07/27/08 http://bugs.python.org/issue3451created fredrikj subprocess.Popen description unclear.07/27/08 CLOSED http://bugs.python.org/issue3452created lregebro PyType_Ready doesn't ensure that all bases are ready 07/27/08 http://bugs.python.org/issue3453created rupole __getitem__() doesn't capture all slices if class inherits from 07/27/08 CLOSED http://bugs.python.org/issue3454created johnf os.remove()method document error 07/28/08 CLOSED http://bugs.python.org/issue3455created zkfarmer compile python using MinGW 07/28/08 http://bugs.python.org/issue3456created xuecan Release notes for 2.6b2 call it an alpha release 07/28/08 http://bugs.python.org/issue3457created jcd dict.update() optimisation gives unexpected/invalid results when 07/28/08 CLOSED http://bugs.python.org/issue3458created david patch optimize bytes.join()07/28/08 http://bugs.python.org/issue3459created pitrou patch PyUnicode_Join could perhaps be simpler 07/28/08 http://bugs.python.org/issue3460created pitrou patch smtplib does not fully support IPv6 in EHLO 07/28/08 http://bugs.python.org/issue3461created dmorr patch test_builtin fails after test_decimal07/29/08 CLOSED http://bugs.python.org/issue3462created benjamin.peterson make life.py use more rendering characters 07/29/08 http://bugs.python.org/issue3463created mvngu patch Python & NCURSES 07/29/08 CLOSED http://bugs.python.org/issue3464created nandha doctest unable to use '...' for unicode litera
Re: [Python-Dev] Fuzzing bugs: most bugs are closed
On Wed, Jul 30, 2008 at 11:17 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Mon, Jul 21, 2008 at 10:41 AM, A.M. Kuchling <[EMAIL PROTECTED]> wrote: >> On Mon, Jul 21, 2008 at 03:53:18PM +, Antoine Pitrou wrote: >>> The underscore at the beginning of _sre clearly indicates that the module is >>> not recommended for direct consumption, IMO. Even the functions that don't >>> themselves start with an underscore... >> >> Sure, but if someone is trying to break in or DoS your application >> server, they don't care if the module starts with an underscore or >> not. >> >> To answer Victor's original question: the parser & compiler that turn >> a regex into bytecode is written in Python. I can't think of a way to >> prevent other Python modules from importing _sre or accessing the >> compile() function; if nothing else, code could always do 'import re ; >> re.sre_compile._sre.compile(...)'. > > I've written a re-code verifier for the Google App Engine. I have > permission to open source this, hopefully I will get to this before > 2.6 beta 3. The code is now in the bug tracker: http://bugs.python.org/issue3487 I'll hold off submitting for a while until Barry has had the time to veto it (or hopefully not :-). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Matrix product
Guido van Rossum wrote: > On Fri, Jul 25, 2008 at 6:50 PM, Greg Ewing <[EMAIL PROTECTED]> > wrote: >> Sebastien Loisel wrote: >> >>> What are the odds of this thing going in? >> >> I don't know. Guido has said nothing about it so far this >> time round, and his is the only opinion that matters in the >> end. > > I'd rather stay silent until a PEP exists, but I should point out that > last time '@' was considered as a new operator, that character had no > uses in the language at all. Now it is the decorator marker. Therefore > it may not be so attractive any more. Others have indicated already how pep 225 seems to be the best current summary of this issue. Here's a concrete proposal: the SciPy conference, where a lot of people with a direct stake on this mattter will be present, will be held very soon (August 19-24 at Caltech): http://conference.scipy.org/ I am hereby volunteering to try to organize a BOF session at the conference on this topic, and can come back later with the summary. I'm also scheduled to give a talk at BayPiggies on Numpy/Scipy soon after the conference, so that may be a good opportunity to have some further discussions in person with some of you. It's probably worth noting that python is *really* growing in the scientific world. A few weeks ago I ran a session on Python for science at the annual SIAM conference (the largest applied math conference in the country), with remarkable success: http://fdoperez.blogspot.com/2008/07/python-tools-for-science-go-to-siam.html (punchline: we were selected for the annual highlights - http://www.ams.org/ams/siam-2008.html#python). This is just to show that python really matters to scientific users, and its impact is growing rapidly, as the tools mature and we reach critical mass so the network effects kick in. It would be great to see this topic considered for the language in the 2.7/3.1 timeframe, and I'm willing to help with some of the legwork. So if this idea sounds agreeable to python-dev, I'd need to know whether I should propose the BOF using pep 225 as a starting point, or if there are any other considerations on the matter I should be aware of (I've read this thread in full, but I just want to start on track since the BOF is a one-shot event). I'll obviously post this on the numpy/scipy mailing lists so those not coming to the conference can participate, but an all-hands BOF is an excellent opportunity to collect feedback and ideas from the community that is likely to care most about this feature. Thanks, f ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Matrix product
Fernando Perez wrote: re http://www.python.org/dev/peps/pep-0225/ I am hereby volunteering to try to organize a BOF session at the conference on this topic, and can come back later with the summary. I'm also scheduled to give a talk at BayPiggies on Numpy/Scipy soon after the conference, so that may be a good opportunity to have some further discussions in person with some of you. ... So if this idea sounds agreeable to python-dev, I'd need to know whether I should propose the BOF using pep 225 as a starting point, or if there are any other considerations on the matter I should be aware of (I've read this thread in full, but I just want to start on track since the BOF is a one-shot event). I'll obviously post this on the numpy/scipy mailing lists so those not coming to the conference can participate, but an all-hands BOF is an excellent opportunity to collect feedback and ideas from the community that is likely to care most about this feature. When I read this some years ago, I was impressed by the unifying concept of operations on elements versus objects. And rereading, I plan to use the concept in writing about computation with Python. But implementing even half of the total examples with operator syntax rather than functions seemed a bit revolutionary and heavy. I am not sure I would want the number of __special__ methods nearly doubled. On the other hand, there is something to be said for orthogonality. That said, I am curious what working scientists using Python think. tjr ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Matrix product
Terry Reedy wrote: That said, I am curious what working scientists using Python think. Well, we'll let you know more after SciPy '08, but I suspect the answer is that they just want one teensy little wafer-thin operator to do matrix multiplication on numpy arrays or their favorite matrix object. I don't think there are many scientists/engineers/whatnot who want to double the number of operators to learn or who care if the matmult operator works on lists of lists or anything else in the standard library. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Base-96
I think that would be very interesting thay Python would have a module for working on base 96 too. [1] It could be converted to base 96 the digests from hashlib module, and random bytes used on crypto (to create the salt, the IV, or a key). As you can see here [2], the printable ASCII characters are 94 (decimal code range of 33-126). So only left to add another 2 characters more; the space (code 32), and one not-printable char (which doesn't create any problem) by last. [1] http://svn.python.org/view/python/trunk/Modules/binascii.c [2] http://en.wikipedia.org/wiki/ISO/IEC_8859-1 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Base-96
This sounds more like something to bring up in [EMAIL PROTECTED] Also, rather than being vague about the motivation ("would be very interesting", you ought to think of a realistic use case. For example, are there existing encodings of binary data using base-96? I'm not aware of any. On Fri, Aug 1, 2008 at 4:06 PM, Kless <[EMAIL PROTECTED]> wrote: > I think that would be very interesting thay Python would have a module > for working on base 96 too. [1] > > It could be converted to base 96 the digests from hashlib module, and > random bytes used on crypto (to create the salt, the IV, or a key). > > As you can see here [2], the printable ASCII characters are 94 > (decimal code range of 33-126). So only left to add another 2 > characters more; the space (code 32), and one not-printable char > (which doesn't create any problem) by last. > > > [1] http://svn.python.org/view/python/trunk/Modules/binascii.c > [2] http://en.wikipedia.org/wiki/ISO/IEC_8859-1 -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Base-96
Guido van Rossum wrote: This sounds more like something to bring up in [EMAIL PROTECTED] Also, rather than being vague about the motivation ("would be very interesting", you ought to think of a realistic use case. For example, are there existing encodings of binary data using base-96? I'm not aware of any. On Fri, Aug 1, 2008 at 4:06 PM, Kless <[EMAIL PROTECTED]> wrote: I think that would be very interesting thay Python would have a module for working on base 96 too. [1] It could be converted to base 96 the digests from hashlib module, and random bytes used on crypto (to create the salt, the IV, or a key). As you can see here [2], the printable ASCII characters are 94 (decimal code range of 33-126). So only left to add another 2 characters more; the space (code 32), and one not-printable char (which doesn't create any problem) by last. [1] http://svn.python.org/view/python/trunk/Modules/binascii.c [2] http://en.wikipedia.org/wiki/ISO/IEC_8859-1 96 is approximately 2^6.585 For some reason, integral powers of two seem so much more, well, POWERFUL, if you know what I mean. Frankly I think you are being either optimistic or charitable in suggesting that such a use case might exist. There's a reason that DEC called their equivalent of base64 "6-bit encoding". But then I wanted to keep integer division as it was, so I am clearly a techno-luddite. If the world wants fractional bits I'm sure it's only a matter of time before some genius decides to design a 67.9-bit computer. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com