qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Robie <jonathan.ro...@redhat.com>
Subject C++, Python: Common Includes
Date Wed, 11 Feb 2009 16:56:06 GMT
 From our sample programs:


#include <qpid/client/Connection.h>
#include <qpid/client/Session.h>
using namespace qpid::client;
using namespace qpid::framing;


import qpid
import sys
import os
from qpid.util import connect
from qpid.connection import Connection
from qpid.datatypes import Message, RangedSet, uuid4
from qpid.queue import Empty

To me, the C++ is clean and easy to remember. To me, the Python is 
cluttered, and I have to look it up each time. In general, if I import a 
class, I don't want to have to ask "what else do I need to import if I 
want to be able to use the class I just imported?"

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?


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

View raw message