I was hoping someone could tell me what the PEP8 style is for class instances. The style guide just says CamelCase for classes, but I usually see people using mixedCase for instances. I don't mean instance variables either, but the instance itself.

I used CamelCase for classes and instances alike for quite some time. Lately I have been using lower_case_with_underscores for the instances. I really would be interested in a definitive answer on this.

mixedCase is a general no-no in modern python code. You occasionally see it in older stuff (including the well known "rat book") and you see it in the code of those who started programming with another language before python.

PEP8 wrote:mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.

instance = ClassName()'''^ is a module namespace variable name pointing to a instance object of ClassName'''

This is not so clearcut but its not a class name as it isn't preceded by 'class', it is a variable name that is pointing to an instance object.This variable name is global to the modules namespace, my guess(and its only a guess) is that when they state 'Global Variable Names' in pep8,it means variables that are global to the module namespace.So it would come under this part.

Global Variable Names

(Let's hope that these variables are meant for use inside one module only.) The conventions are about the same as those for functions.

Modules that are designed for use via from M import * should use the __all__ mechanism to prevent exporting globals, or use the older convention of prefixing such globals with an underscore (which you might want to do to indicate these globals are "module non-public").

It states they follow the same style as functions.

Function Names

Function names should be lowercase, with words separated by underscores as necessary to improve readability.

mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.

Thats a long winded way to conclude that

PEP8 recommends lower_case_with_underscores.

Search through the python docs and see if they use CamelCase for the naming of any instance object variable names.

I found this where they create a class and then use a lowercase variable name for it.