Dynamic Class Injection and friends

Fred Gansevles gansevle at cs.utwente.nl
Mon May 8 09:54:44 EDT 2000


I have constructed a package which makes is easy to change
instance-behaviour 'on the fly'.
I'm currentely struggeling wilt the possibilities this package opens
and have a hard time to explaining this to other people, so if anyone
likes to comment on the package, please do so.

The package contains 5 modules.
  + dci.py (the package itself) contains the core for Dynamic Class
    Injection
  + ___.py implements a hidden dictionary. This works currentely in
    Python 1.5.* and in PythonCVS but I don't know if this will still
    work in Python 1.6-finally and up.
  + attr.py let you do nifty things with attributes and heavily
    uses the dci and ___ modules
  + cpp.py implements a more C++-like style of private/protected
    attributes. The module is mainly a proof of concept, not a
    red-herring to (re-)open the discussion about private and protected
    attributes. The main drawback of cpp.py is that it's SLOOOWWW.
  + pickle.py makes it possible to pickle/unpickle instances of
    inner-classes and dci-injected instances.

Within the package directory are some `.txt' files that try to explain
things a bit more.

The package can be downloaded from
    http://www.cs.utwente.nl/~gansevle/python/Dci-0.1.0.tar.gz
There is also a browsable version at
    http://www.cs.utwente.nl/~gansevle/python/Dci-0.1.0/

-----------------------------------------------------------------------
----          Linux/Windows-NT/IntraNetware Administrator          ----
-- Whenever it sounds simple, I've probably missed something! ... Me --
-----------------------------------------------------------------------


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list