On 12/12/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 12/11/05, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > class Document(_cdm.Document):
> >     ...
> >     # add convenience methods here
> >     ...
>
> Personally, I find that naming convention a mistake. Call it
> MyDocument or EnhancedDocument or DocumentPlusPlus (be creative!) but
> don't reuse the original name.
>
> I'm not saying this because it helps the __private argument; I'm
> saying this because in lots of contexts we leave out the
> package/module path and only use the class name, and added
> functionality is a good reason to be able to distinguish between the
> original class and the enhanced version.

Ahh.  I never run into this because I never import objects directly
from modules.  So, instead of:

    from elementtree.ElementTree import ElementTree
    ...
    ElementTree(...)

I almost always write something like:

    import elementtree.ElementTree as et
    ...
    et.ElementTree(...)

Thus, all objects that were imported from external modules are always
immediately identifiable as such by their prefixed module name.  I do
see though that if you like to import the objects directly from the
module this could be confusing.

STeVe
--
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to