Re: [Python-Dev] PEP 575: Unifying function/method classes
On 2018-04-13 21:30, Raymond Hettinger wrote: It would be nice to have a section that specifically discusses the implications with respect to other existing function-like tooling: classmethod, staticmethod, partial, itemgetter, attrgetter, methodgetter, etc. My hope is that there are no such implications. An important design goal of this PEP (which I believe I achieved) is that as long as you're doing duck typing, you should be safe. I believe that the tools in your list do exactly that. It's only when you use inspect or when you do type checks that you will see the difference with this PEP. After implementing the C code part of my PEP, there were only a relatively small number of test failures. You can look at this commit which contains all Python code changes of my implementation, it doesn't look so bad: https://github.com/jdemeyer/cpython/commit/c404a8f1b7d9525dd2842712fe183a051a4b5094 For example, I would need to update the code in random._randbelow(). For the record, there are no test failures related to this, but maybe that's just because tests for this are missing. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 575: Unifying function/method classes
On 2018-04-13 15:23, Nick Coghlan wrote: There's also a section in the rationale which refers to METH_USRx flags, which I'm guessing from context are an idea you were considering proposing, but eventually dropped from the rest of the PEP. No, I actually still want to propose it. In my latest update of the PEP, I hope to have made it more clear. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 575: Unifying function/method classes
On Sat, Apr 14, 2018 at 2:17 AM, Jeroen Demeyer wrote: > On 2018-04-13 21:30, Raymond Hettinger wrote: > >> It would be nice to have a section that specifically discusses the >> implications with respect to other existing function-like tooling: >> classmethod, staticmethod, partial, itemgetter, attrgetter, methodgetter, >> etc. >> > > My hope is that there are no such implications. An important design goal > of this PEP (which I believe I achieved) is that as long as you're doing > duck typing, you should be safe. I believe that the tools in your list do > exactly that. > > It's only when you use inspect or when you do type checks that you will > see the difference with this PEP. > That actually sounds like a pretty big problem. I'm sure there is lots of code that doesn't *just* duck-type nor calls inspect but uses isinstance() to decide how to extract the desired information. > After implementing the C code part of my PEP, there were only a relatively > small number of test failures. You can look at this commit which contains > all Python code changes of my implementation, it doesn't look so bad: > > https://github.com/jdemeyer/cpython/commit/c404a8f1b7d9525dd > 2842712fe183a051a4b5094 > > For example, I would need to update the code in random._randbelow(). >> > > For the record, there are no test failures related to this, but maybe > that's just because tests for this are missing. > -- --Guido van Rossum (python.org/~guido) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] [RELEASE] Python 2.7.15 release candidate 1
I'm pleased to announce the immediate availability of Python 2.7.15 release candidate 1. Python 2.7.15rc1 is a preview release of the next bug fix release in the Python 2.7.x series. Python 2.7.15rc1 may be downloaded in source and binary forms from https://www.python.org/downloads/release/python-2715rc1/ Please consider testing this release with your applications and libraries and reporting bugs to https://bugs.python.org/ A final release is expected in 2 weeks time. 2.7.15 includes some noteworthy changes to the macOS installers: All python.org macOS installers now ship with a built-in copy of OpenSSL. Additionally, there is a new additional installer variant for macOS 10.9+ that includes a built-in version of Tcl/Tk 8.6. See the installer README for more information. Thank you, Benjamin (on behalf of 2.7's release team and contributors) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com