Miscellaneous design and Python use questions

Travis B. Hartwell travis at travis.aggievilla.org
Thu Feb 17 22:18:12 EST 2000


I have been a Python user for approximately four months now.  I have
come to really enjoy the strengths of this language and the great
power that it has.  But, as I have gained 'Python-mode' for my editor,
I haven't quite gained a 'Python-mode' for my brain.  So, alluding to
that, I have a few questions regarding all things Python.

I suppose my questions here are geared to Python as it is used in a
large project -- more than a script of ~200 lines.

1)  When I do a typical OO-design with C++, I pay a lot of attention
to information hiding.  I.E., I keep all of the data members private
and rely on get/set functions to use them.  I feel that this is a good
practice.  But, with Python, we don't have the access issue.  I still
believe that information hiding is a good idea.  From the experienced
Python developers, is it practice to use such functions within your
classes?  Or do you just access things directly?  What are your
thoughts on style regarding this?

2)  I am planning using Python embedded in one of my applications --
using C++ Builder for the GUI development and speed-critical
portions.  For the rest, I would prefer to use Python just because I
have become accustomed to its power.  But, I have been having a few
road-blocks in this plan for embedded Python.  I guess I'm having a
hard time visualizing exactly where to have the 'dividing line'
between C++ and Python and in designing the interfaces between the
two.  What are some general hints in designing applications using
Python as the engine and C++ as the front-end?

  I guess those are my only questions for now.  Thanks for your help
in advance!

Travis B. Hartwell




More information about the Python-list mailing list