Re: Re: Trellis: ctrl.pulse
"P.J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Wed, 15 Apr 2009 17:17:17 -0400
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
At 11:48 PM 4/15/2009 +0300, Sergey Schetinin wrote: >On Wed, Apr 15, 2009 at 23:43, P.J. Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> wrote: > > At 11:38 PM 4/15/2009 +0300, Sergey Schetinin wrote: > >> > >> On Wed, Apr 15, 2009 at 23:11, Sergey Schetinin <[email protected]> wrote: > >> > Importing trellis from stm is ugly, and messes with lazy imports of > >> > trellis (as done by Importing), replacing pulse with a special cell > >> > doesn't seem to hard, see attached patch. > >> > >> Also, install_controller is unnecessary: > > > > install_controller() is an API function so that you can replace the > > controller, e.g. for testing or for applications with special needs. > >Oh, I see, but given it populates the global namespace, if some other >module already did "from peak.events.trellis import *" things will >break. Yes. So don't do that. ;-) >Can it really be part of API? Technically, I haven't documented it yet. But that was the original intent of having it there. At the moment it's more of a semi-private hack. However, it's why you'll almost never see me importing stuff from 'trellis', as opposed to using 'trellis.whatever'.