[Numpy-discussion] adopting Python Style Guide for classes
Tue Oct 2 11:52:14 CDT 2007
Jarrod Millman wrote:
> I am hoping that most of you agree with the general principle of
> bringing NumPy and SciPy into compliance with the standard naming
> 3. When we release NumPy 1.1, we will convert all (or almost all)
> class names to CapWords.
What's the backwards-compatible plan?
- keep the old names as aliases?
- raise deprecation warnings?
What about factory functions that kind of look like they might be
classes -- numpy.array() comes to mind. Though maybe using CamelCase for
the real classes will help folks understand the difference.
What is a "class" in this case -- with new-style classes, there is no
distinction between types and classes, so I guess they are all classes,
which means lots of things like:
etc. etc. etc. are classes. should they be CamelCase too?
for i in dir(numpy):
if type(getattr(numpy, i)) == type(numpy.ndarray): print i
Yields 86 type objects.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
More information about the Numpy-discussion