Re: [Python-Dev] PEP 309 enhancements
Samuele Pedroni wrote: Nick Coghlan wrote: The initial suggestion was to provide a __get__ method on partial objects, which forces the insertion of the reference to self at the beginning of the argument list instead of at the end: def __get__(self, obj, type=None): if obj is None: return self return partial(self.fn, obj, *self.args, **self.kw) just a note: I don't see why this is not also a possible definition: return partial(self.fn, *(self.args+(obj,)), **self.kw) it may be impractical, but it would implement the direct mechanics of partial should behave like a function. It certainly *is* a possible definition, but you can get essentially that behaviour using new.instancemethod, so a new descriptor isn't necessary for that case. The suggested descriptor was to get an alternate behaviour which injected the automatically supplied self argument at the start of the list of positional arguments. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://boredomandlaziness.skystorm.net ___ 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] Re: PEP 754
[After a long delay, the thread continues] Hi All, I'm pushing ahead on the tasks necessary to add the 'fcponst' module described in PEP 754: IEEE 754 Floating Point Special Values. Per http://www.python.org/psf/contrib, I've - Changed the license to the Apache License, Version 2.0 - Just faxed the Contributor Agreement to the PSF I've also - created a patch on sourceforge.net for fpconst code and documentation (see https://sourceforge.net/tracker/index.php?func=detailaid=1151323group_id=5 470atid=305470) I will need help connecting the included test functions into the python test suite. What else needs to be done to allow fpconst to go into the Python library? -Greg -Original Message- From: Tim Peters [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 1:43 PM To: Warnes, Gregory R; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Python-Dev] Re: PEP 754 [Warnes, Gregory R] Hi David Tim, First, I really like to see this go forward. The fpconst module is getting alot of use across the net, and it would be very useful to finally get it into the standard python library. What needs to be done to move forward? Looks to me like exactly the same stuff as was needed before. Guido needs to pronounce on it. It needs a patch on SourceForge, adding the new module, new docs, and a test suite run by Python's standard regrtest.py. The non-PSF copyright and license remain problematic. That last should be easier to deal with after the PSF approves a Contributor Agreement (probably within a month), but will be a show-stopper if Pfizer won't contribute the module under the terms of the Contributor Agreement (which can't be answered now by anyone, since the Contributor Agreement doesn't exist yet). LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. ___ 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] Re: [Python Dev] PEP 309
Overall, I have no major objections to the PEP or the patch. Before it goes in on auto-pilot, it would be darned nice if the proponents said that they've found it helpful in real code and that they are satisfied with the timings. I guess darned nice is the best you can hope for. Not sure if Peter Harris is still around. Regards, Martin Yes, I'm still lurking, slightly aghast that my little PEP is getting such ferocious scrutiny. I would have like some of that in time for it to go into 2.4, but I suppose you should be careful what you wish for. I'll answer a few points from this thread, in no particular order: My original desire was a built-in, but it was suggested that the first step would be a Python implementation in the standard library to try it out. That was the basis for the PEP, and in fact a C implementation would have been beyond my expertise. However, I sympathise with anyone who feels unhappy about a new module just for what amounts to one function. I'd be happy to go back to the built-in, now someone cleverer than I am has written one. Sorry I can't rememeber your name, whoever you are. I'm having trouble with my e-mails. I was never too bothered about efficiency, and still am not. For me it was always primarily a way to save typing or build call-back functions on the fly. The discussion about using it to make instancemethods and classmethods -- way over my head! I would count that as something weird enough to be worth spelling out in plain Python, in my code anyway. The PEP was scattered over a few patches because I wasn't too sure how to go about it, so there was my Python module, the C implementation, the unit tests and the docs all in separate patches. 3/4 of that was my fault - sorry! Once the PEP had been accepted, I didn't like to mess with it, which is why I went quiet for a while. It's gone past the point where I can personally contribute much, so I'd just like to say thanks and I look forward to the day when I can just use it. Peter Harris ___ 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] Re: [Python Dev] PEP 309
Peter Harris [EMAIL PROTECTED] wrote: However, I sympathise with anyone who feels unhappy about a new module just for what amounts to one function. Well, since it seems that the emphasis in Python development is now moving more towards expanding the standard library, a module that has only one function now might grow more functions in the not so distant future, so I have to say that I'm on the side of not being unhappy with the added module. (I'm also secretly hoping that map, filter, reduce, etc. will be moved to the functional module in the future, maybe in Python 3.0. But that's probably just my love for list comprehensions and generator expressions speaking.) ;-) Steve -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy ___ 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] Re: [Python Dev] PEP 309
[Peter Harris] I look forward to the day when I can just use it. You PEP is marked as final. The code has been checked in to CVS and will be in Py2.5. Congrats, Raymond Hettinger ___ 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] Re: PEP 754
Warnes, Gregory R wrote: What else needs to be done to allow fpconst to go into the Python library? See PEP 1. First, the PEP must be Accepted. Regards, Martin ___ 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] Weekly Python Patch/Bug Summary
Patch / Bug Summary ___ Patches : 303 open ( -5) / 2764 closed ( +9) / 3067 total ( +4) Bugs: 849 open (+11) / 4837 closed ( +3) / 5686 total (+14) RFE : 169 open ( +1) / 148 closed ( +0) / 317 total ( +1) New / Reopened Patches __ New fpconst module (2005-02-24) http://python.org/sf/1151323 opened by Gregory Warnes PyXxx_Check() speed-up (2005-02-27) http://python.org/sf/1153056 opened by Armin Rigo os.remove error on Solaris (2005-02-28) http://python.org/sf/1153417 opened by Richard Philips Patches Closed __ rlcompleter does not expand on [ ] (2002-04-22) http://python.org/sf/547176 closed by mwh Non-blocking Socket Server (2004-05-02) http://python.org/sf/946207 closed by loewis add urldecode() method to urllib (2003-05-21) http://python.org/sf/740827 closed by loewis adding bool support to xdrlib.py (2004-10-18) http://python.org/sf/1049151 closed by loewis PEP309 Partial implementation (2004-04-25) http://python.org/sf/941881 closed by rhettinger sanity check for readline remove/replace (2004-12-31) http://python.org/sf/1093585 closed by loewis PEP 309 LaTeX documentation (2004-04-07) http://python.org/sf/931007 closed by rhettinger Build Patch #941881 (PEP 309 in C) on windows (2004-08-10) http://python.org/sf/1006948 closed by rhettinger PEP 309 unit tests (2004-04-07) http://python.org/sf/931010 closed by rhettinger New / Reopened Bugs ___ hotshot.runctx: builtins missing (2005-02-23) http://python.org/sf/1149798 opened by Jurjen N.E. Bos macostools.mkdirs: not thread-safe (2005-02-23) http://python.org/sf/1149804 opened by Jurjen N.E. Bos (XMLRPC) multitude of sockets ending up in TIME_WAIT (2005-02-25) http://python.org/sf/1151968 opened by Jonas Widén Dict docstring error Python-2.3.5 (2005-02-26) http://python.org/sf/1152424 opened by Colin J. Williams urllib2 dont respect debuglevel in httplib (2005-02-27) http://python.org/sf/1152723 opened by abbatini Default class args get clobbered by prior instances. (2005-02-26) CLOSED http://python.org/sf/1152726 opened by Simon Drabble curses.textpad raises error (2005-02-27) http://python.org/sf/1152762 opened by John McPherson Setting socket timeout crashes SSL (2005-02-27) http://python.org/sf/1153016 opened by pristine777 http_error_302() crashes with 'HTTP/1.1 400 Bad Request (2005-02-27) http://python.org/sf/1153027 opened by pristine777 PyXxx_Check(x) trusts x-ob_type-tp_mro (2005-02-27) http://python.org/sf/1153075 opened by Armin Rigo reflected operator not used when operands have the same type (2005-02-27) http://python.org/sf/1153163 opened by HughSW reflected operator not used when operands have the same type (2005-02-27) CLOSED http://python.org/sf/1153171 opened by HughSW string interpolation breaks with %d and large float (2005-02-28) http://python.org/sf/1153226 opened by Stephen Thorne eval does not bind variables in lambda bodies correctly (2005-02-28) http://python.org/sf/1153622 opened by Mattias Engdegård String interpolation needs PEP 237 update (2005-02-28) http://python.org/sf/1153769 opened by Richard Brodie Bugs Closed ___ Python24.dll crashes, EXAMPLE ATTACHED (2005-02-12) http://python.org/sf/1121201 closed by complex Default class args get clobbered by prior instances. (2005-02-26) http://python.org/sf/1152726 closed by rhettinger reflected operator not used when operands have the same type (2005-02-27) http://python.org/sf/1153171 closed by rhettinger New / Reopened RFE __ Enhance file.readlines by making line separator selectable (2005-02-26) http://python.org/sf/1152248 opened by Nick Coghlan ___ 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