Suggestions for python 2

Edward Welbourne eddy at vortigen.demon.co.uk
Sun Jan 16 19:15:23 EST 2000


I have been thinking about the namespace types.
That's modules, packages, classes and instances.
I believe they could profitably be united into *one* type.
Along the way, I see some constructive uniformisations we could apply.

I have written this up at
  http://www.chaos.org.uk/~eddy/dev/toy/python2.html
and thence-linked locations.  [The page also describes a fix to grail
0.5 which may be needed when reading the associated .py files.]

My proposal contains enough slack to allow for the following things
(among others) that some folk seem to want:

  * namespaces that you can't modify once they have been initialised
  * namespaces in which attribute-modification is type-checked
  * hybrids of those with assorted degrees of control
  * certain tools the functional programmers crave, notably a truly
    faithful implementation of currie()
  * some of the truly whacky `metaclass' proposals

and, of course, the stuff we're used to (notably class, albeit demoted
to a built-in) with minimal perturbation.  The changes are, IMO,
straightforward and pythonic: they reduce the number of special
attributes the interpreter is obliged to know about and do *not* depend
on strange hacks or anomalies.  They do perturb syntax.

I intend to push this proposal during IPC8.  I would greatly appreciate
constructive comments in advance, if only to temper my enthusiasm ;^}

	Eddy.
--
Those who have seen versions of my pages prior to 2000/Jan/17 should
note that I have simplified and clarified them somewhat of late.
I believe I have eliminated all risk of exploding heads.  YMMV.




More information about the Python-list mailing list