Encapsulation in Python

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Mar 14 17:23:33 EDT 2016


On 14/03/2016 21:09, Ian Kelly wrote:
> On Mon, Mar 14, 2016 at 11:32 AM, Rick Johnson
> <rantingrickjohnson at gmail.com> wrote:
>> Ignoring Tkinter, which is a gawd awful mess, how would you
>> re-organize the 3,656 symbols in OpenGL.GL into smaller
>> modules, without dividing them up along some random or
>> arbitrary lines?
>
> In that particular case, I wouldn't, except possibly as an
> implementation detail with the main OpenGL package importing the
> contents of all its sub-packages into itself (and I think that if you
> look at the PyOpenGL source you'll find that it's doing something
> similar). It's following a well-documented API that is separate from
> its Python wrapper. It's unfortunate that the only namespacing
> considered in the design of that API was "everything starts with the
> prefix gl", but that's what we're stuck with. Moving things around
> would just confuse users who can't then find them where they expect.
>

If it was reorganised rr would claim that it had split the community in 
the same way that the disastrous migration from Python 2 to 3 has done. 
  The minor snag to his argument is that I'm not aware of any such split.

Python 2.8, RickedPython, and the latest entry into the race, 
BartCPython, all vapourware.  At least rr knows something about 
tkinter/IDLE, whereas the latter appears to know squat about anything. 
You can fool all of the programmers, all of the time?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list