[Twisted-Python] possible documentation inaccuracy

Christopher Armstrong carmstro at twistedmatrix.com
Mon Jul 22 10:10:38 MDT 2002


On Mon, 2002-07-22 at 03:16, mike bannister wrote:
> "Class names should not include the name of the module they are a 
> part of. Examples:"

This means you shouldn't compound the module name with the class name,
i.e., module.ModuleClass.

> and a list follows. Without looking at the list the above sentence 
> already seems slightly ambiguous to me. Am I about to see a list of
> examples that meet the above criterion or fail to? 

Those are good class names, fully qualified with their module.

> My next problem is when I do look at the list my above question 
> remains. If I assume it's a list of proper naming examples then the
> first item (twisted.reality.thing.Thing) wouldn't be right. Right? 
> The class name (Thing) includes the name of the module (thing). If I
> assume it's a list of incorrect naming examples then the second item
> (twisted.web.Handler) would be a problem because the class name
> (Handler) doesn't include the package name (web) making it an example
> of proper naming.

thing.Thing is arguably bad naming, but the point is that it's not a
compound of the module name and the class name.

Anyway, I'll update that doc to be more clear.

-- 
                                Chris Armstrong
                         << radix at twistedmatrix.com >>
                http://twistedmatrix.com/users/carmstro.twistd/





More information about the Twisted-Python mailing list