vocab question
kyosohma at gmail.com
kyosohma at gmail.com
Fri Apr 13 15:26:34 EDT 2007
On Apr 13, 2:06 pm, Alan G Isaac <ais... at american.edu> wrote:
> Pardon the vocab question;
> I'm not a computer science type.
> According to the Reference Manual,
> a class defintion has the structure::
>
> classdef ::= "class" classname [inheritance] ":" suite
>
> What is the entire part before the suite called?
> (Just pointing to a reference is fine & helpful,
> as long as its not an entire course on BNF.)
>
> Thanks,
> Alan Isaac
I don't know if this will help or not, but here goes. Here is a
generic class example:
class MyNewObject(bases):
'doc string'
#class_suite
"class" is a keyword of python. MyNewObject is the "class name" of the
class you (the programmer) created. And "bases" are what the class
inherits from. This is technically known as the new class model. The
old one didn't require you to inherit from a parent class, such as
"object".
Most of my classes still do not sub-class from a parent class yet
(except for my wxPython GUI code) as this isn't enforced yet.
Mike
More information about the Python-list
mailing list