FAQ

On 8/24/2015 6:07 AM, Thomas G?ttler wrote:

Am 20.08.2015 um 17:29 schrieb Guido van Rossum:
I think it's reasonable to propose @classproperty as a patch to
CPython. It needs to be C code. Not sure about the
writable version. The lazy=True part is not appropriate for th he
stdlib (it's just a memoize pattern).
What's the next step?

Open an issue on the tracker. Quote Guido's message above with list
name, date, and thread name -- or pipermail archive url. Add python code
below, or revision thereof, for someone to translate to C.

My knowledge of the programming language C is very limited. I am not
able to write a
patch for CPython.

I could write a patch which looks like this:

{{{
# From http://stackoverflow.com/a/5192374/633961

class classproperty(object):
def __init__(self, f):
self.f = f
def __get__(self, obj, owner):
return self.f(owner)

}}}






--
Terry Jan Reedy

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 19 of 23 | next ›
Discussion Overview
grouppython-ideas @
categoriespython
postedAug 20, '15 at 6:54a
activeAug 29, '15 at 9:21p
posts23
users10
websitepython.org

People

Translate

site design / logo © 2017 Grokbase