[IPython-user] [IPython-dev] IPython development news and prospects
Wed Jan 16 14:08:58 CST 2008
Fernando Perez wrote:
> On Jan 15, 2008 10:20 PM, Prabhu Ramachandran <email@example.com> wrote:
>> Fernando Perez wrote:
>>> The idea is to write a very lightweight, Traits-like module that does
>>> only a fraction of what Traits does, but does so with 100% api
>>> compatibility within that subset. Basically we'd only implement
>> IMNSHO, I think this is a step in the wrong direction! Do you really
>> have that much time on your hands? How are you going to maintain b/w
>> compat? What about new versions/new features, tests, bugs? An option
>> would be to request Dave Morrill to see if this could be done in traits.
>> Kind of like elementtree/celementtree.
> I'm not sure it would take that much time: keep in mind I'm not
> talking about implementing all of traits, but only:
> 1. Validation on assignment for a handful of basic, builtin types
> (strings, numbers, lists).
> 2. Callback registration.
> That's it. It doesn't matter what new features the real Traits gets,
> since we're not implementing those at all.
In that case, don't bother with Traits API compatibility. At least not in the
sense of being able to drop in enthought.traits instead of
ipython1.almost_traits. Just implement the features that you need in the most
straightforward way to solve your problem. Trying to emulate a subset of the
Traits API is going to be a distraction for you and a source of confusion down
the road. Who wants to try to remember which parts of the API you implemented
and which you didn't?
If you want Traits and almost_traits to be able to work together, that's another
thing. It should be straightforward to provide some utility functions for
hooking up listeners between HasAlmostTraits and HasTraits objects.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the IPython-user