Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r66264:790e2ef30000 Date: 2013-08-20 16:56 +0200 http://bitbucket.org/pypy/pypy/changeset/790e2ef30000/
Log: Document diff --git a/pypy/doc/coding-guide.rst b/pypy/doc/coding-guide.rst --- a/pypy/doc/coding-guide.rst +++ b/pypy/doc/coding-guide.rst @@ -339,9 +339,10 @@ + methods and other class attributes do not change after startup + single inheritance is fully supported -+ simple mixins somewhat work too, but the mixed in class needs a - ``_mixin_ = True`` class attribute. isinstance checks against the - mixin type will fail when translated. ++ use `rpython.rlib.objectmodel.import_from_mixin(M)` in a class + body to copy the whole content of a class `M`. This can be used + to implement mixins: functions and staticmethods are duplicated + (the other class attributes are just copied unmodified). + classes are first-class objects too _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit