Skip to content

Instantly share code, notes, and snippets.

View filipefigcorreia's full-sized avatar

Filipe Correia filipefigcorreia

View GitHub Profile
@filipefigcorreia
filipefigcorreia / model.py
Created March 30, 2012 09:02
Experiments on changing/extending python's object model using conventions
# -*- coding: utf-8 -*-
"""
Goal is to avoid reinventing the Wheel™, and try to use the python
language's mechanisms as much as possible, instead of implementing the
Type-Square pattern from scratch.
Entity is a metaclass. It descends from "type", and adds some extra data
to the class during its initialization. That data is used to "extend" the
"type" class.