RE: [Edu-sig] Re: Teaching graphics with Python (was Introductoryhighschool programming)

import cvisual import time import atexit
def __waitclose(): while not cvisual.allclosed(): time.sleep(0.05) atexit.register(__waitclose)
scene = cvisual.display()
class sphere (cvisual.sphere): def __init__( self,*args,**keywords): cvisual.sphere.__init__(self) self.color=(0,0,1) self.complete_init( self, self, <------- TWO SELVES? 1, scene, None)
s=sphere()
Yeah. TWO SELVES. I get to this by mechanically following some of what is being done in the primitives.py module of the new VPython distribution. As I say, there is no API documented for the facility of subclassing brought to VPython through the Boost implementation. And I suspect not as much attention was given to developing this as an intuitive API as there might have been, and wouldn't be surprised if there is no intention of the VPython project to document it. Or at least to give documentation of it any priority. I suspect that from the focused concerns of the VPython project, the facility is seen - at least at this point - as a byproduct of the use of Boost, rather than something they want to "confuse" their users with. Doesn't mean I'm not free to confuse their users with it ;). Art

Arthur:
As I say, there is no API documented for the facility of subclassing brought to VPython through the Boost implementation.
And I suspect not as much attention was given to developing this as an intuitive API as there might have been, and wouldn't be surprised if there is no intention of the VPython project to document it. Or at least to give documentation of it any priority.
These go together. By not documenting any API, they're free to give more thought to changing it later. Once documented, it's harder to keep revamping it. Until there's some documentation, I guess it's very unsafe (in the sense of future code breakage) to build any real codebase on the new subclassing features. Kirby
participants (2)
-
Arthur
-
Kirby Urner