1.1 --- a/docs/architecture.txt Sat Jul 28 21:08:44 2007 +0200
1.2 +++ b/docs/architecture.txt Sun Jul 29 01:51:44 2007 +0200
1.3 @@ -76,6 +76,28 @@
1.4
1.5 [1] http://java.sun.com/docs/white/delegates.html
1.6
1.7 +Classes, Attributes and Instantiation Behaviours
1.8 +------------------------------------------------
1.9 +
1.10 +A superficial view of the relationship between classes and instances in Python
1.11 +is that instances of a particular class can mostly be treated as equivalent -
1.12 +the class defines the behaviour of them all, and the kind of data stored (or
1.13 +rather referenced by each of them) is likely to be mostly identical. However,
1.14 +we know that some classes encourage a more heterogeneous usage of their
1.15 +instances: lists, for example, often contain a variety of different kinds of
1.16 +data, and it is often accurate to note that within a given program the
1.17 +contents of list objects may vary substantially. Consequently, whilst a simple
1.18 +view of instances and their equivalence may hold for some classes, others
1.19 +require a more sophisticated view of instances created from them.
1.20 +
1.21 +The simplest class behaviour states that only one kind of instance exists for
1.22 +each class; a more sophisticated behaviour states that potentially many kinds
1.23 +of instances exist for a class. In a running program, all instances are
1.24 +distinct and there may be no limit (other than that of physical resources and
1.25 +of time) to how many there may be in the lifetime of a program. However, when
1.26 +modelling the behaviour of a program, it is necessary to be more conservative
1.27 +when attempting to identify such instance types.
1.28 +
1.29 Instance Filtering
1.30 ==================
1.31