Vote to Add Python Package "pubsub" to the Python Standard Library

Carl Banks pavlovevidence at gmail.com
Tue Jun 1 23:09:15 EDT 2010


On May 26, 4:26 am, Tom <tom.brow... at gmail.com> wrote:
> I vote for adding the Python package "pubsub" to the Python standard
> library.  It has recently been added to wxpython (replacing the old
> wx.lib.pubsub package), but it has application to non-gui programs as
> well.


Well, I can definitely see a case for adding something like this to
the standard library.  If there is a standard publish-subscribe
implementation, then different third-party packages can use it in a
consistent way together.  It can open whole paradigms of package
integration.

However, I'm not sure this particular library is the one to use, and I
would not be in favor of throwing the first publish-subscribe
implentation that comes by into the standard library, at least not
without a whole lot of vetting first.  (They did that with optparse
and the Python community has been paying for it ever since.)

I think it has a pretty good chance of being accepted, too.  The
publish-subscribe pattern, if you will, seems to have been implemented
separately in many places.  The logging module in the standard library
uses something like this.  Qt's signal/slot mechanism is another
variation.  I'm sure there's lots more.  I've noticed that pointing
out lots of independetnly crafted examples in the wild, and especially
in the standard library, works quite well.


Carl Banks



More information about the Python-list mailing list