pydanny/cached-property

Can cached_property be a subclass of property?

Open

#26 aperta il 8 ott 2015

Vedi su GitHub
 (3 commenti) (1 reazione) (1 assegnatario)Python (79 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (705 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

There are certain pieces of code in some libraries, linters and static analyzers that check things like

if isinstance(attr, property):
    do_something()

This is especially important for use in metaclasses.

Obviously this fails with cached property; would it be possible to derive it from property so isinstance/issubclass checks work as expected?

Guida contributor