From: Guy K. K. <g....@ma...> - 2009-06-28 01:18:22
|
Hi, just trying to hunt down on how to delete a scene, so I can create a new one within the same running program. Trying to hunt this down I've been wondering why there are so many things within the visual module. It is absolutely a highly polluted name space. It's happening already in the visual.__init__ module through two snowball imports: from math import * from numpy import * Would it be possible to refactor VPython in the future to be a little bit better behaved and just import numpy and math and use the functions using the dot notation (numpy.array, math.sin, ...) rather than them blended *all* directly into the name space? All Python style guides tell to *not* pollute the name space. Here's one from the "Code Like a Pythonista: Idiomatic Python" from David Goodger's PyCon 2007 talk: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#importing Let's try to make Visual Python a good Python citizen! Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |