qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Kramer <j...@globalherald.net>
Subject Re: C++, Python: Common Includes
Date Wed, 11 Feb 2009 18:15:51 GMT

> In Python, couldn't the user just import a Connection class and a Session 
> class, and we could design the API so that they get what they need to use 
> those classes automagically?  Or is there a pythonic reason to do it this 
> way?

Philosophically, the reason you do it that way in Python is because 
everything is explicit - that is, you only import the things you actually 
use, rather than a parent class and everything below it.  This might be an 
artifact of the fact that Python doesn't have any 'private' namespace in 
its classes; to have a clean interface to the classes you use, you really 
ought to import only those things you need.

Practically?  In my opinion it's not a big deal either way, as I have a 
skeleton that I use when I write new Qpid based services.  The skeleton 
imports all of those things automatically.  Likewise with your other 
message regarding having the Python manage the sockets, and attaching the 
Sessions to those Sockets.  I don't think the way things are now presents 
such a pain that it ought to change.

But that's just me.  :)



GlobalHerald.NET, the Smarter Social Network! (tm)

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org

View raw message