Skip to content

Add a standard constructor for dynamic classes #5991

@nthiery

Description

@nthiery

This patch implements sage.structure.dynamic_class.dynamic_class, for constructing dynamically new python classes. The constructed classes can be pickled, and have unique representation.

The patch includes a discussion on the relevance of dynamic classes for Sage.

Depends on #5985 for pickling and #5120.

Used by the upcoming category framework #5891, (and sage-words?)

Issue: is sage.structure.dynamic_class.dynamic_class the natural location for this?

CC: @sagetrac-sage-combinat @saliola @roed314

Component: misc

Keywords: dynamic classes, unique representation

Author: Nicolas M. Thiéry

Reviewer: David Roe

Merged: sage-4.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/5991

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions