sudo pacman -Syu zsh
You do not need to install manjaro-zsh-config
and all the other related packages like zsh-syntax-highlighting
, zsh-history-substring-search
, zsh-autosuggestions
, etc., as we will use Oh My Zsh.
sudo pacman -Syu zsh
You do not need to install manjaro-zsh-config
and all the other related packages like zsh-syntax-highlighting
, zsh-history-substring-search
, zsh-autosuggestions
, etc., as we will use Oh My Zsh.
Given a Parent
class with value
property, Child
can inherit and overload the property while accessing Parent
property getter and setter.
Although we could just reimplement the Child.value
property logic completely without using Parent.value
whatsover, this would violate the DRY principle and, more important, it wouldn't allow for proper multiple inheritance (as show in the example property_inheritance.py
bellow).
Two options:
Child
redefines value
property completely, both getter and setter.from django.db import models | |
from django.db.models.query import QuerySet | |
from django.utils.functional import memoize | |
_class_mapper_cache = {} | |
def class_mapper(model): | |
proxy_for = model._meta.proxy_for_model or model | |
mapper = dict([ (getattr(m, m.CLASS_MAP_ATTR), m) for m in models.get_models() if issubclass(m, proxy_for) and m != proxy_for]) | |
return mapper |