[Baypiggies] A beginner's question on python class

Aahz aahz at pythoncraft.com
Mon Feb 20 05:43:03 CET 2012


On Sun, Feb 19, 2012, Shannon -jj Behrens wrote:
> On Sun, Feb 19, 2012 at 6:57 PM, Yiou Li <liyiou at gmail.com> wrote:
>>
>> I created a python class by inherating from and existing class:
>>
>> myPythonScript.py
>>
>> from standardClass import ClassX
>>
>> Class myClass(ClassX)
>>         myVariable
> 
> What's your question?  By the way, class should be lower case, and you're
> forgetting a semicolon.

s/semicolon/colon/

Also, OP should read PEP 8 to learn about proper formatting: the One True
indent is four spaces.
http://www.python.org/dev/peps/pep-0008/
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Do not taunt happy fun for loops. Do not change lists you are looping over."
--Remco Gerlich


More information about the Baypiggies mailing list