[Python-Dev] Deprecate __ private (was Re: PEP 8updates/clarifications) (original) (raw)

Fredrik Lundh fredrik at pythonware.com
Tue Dec 13 17:26:33 CET 2005


Steven Bethard wrote:

> Everybody here agrees that this style makes the code much less legible. > Partly because of the constant indirection. Also because it imposes > learning all those two-letter abbreviations before reading a module, and > the learning has to be redone on each visit, it just does not stick.

Much less legible than without the namespace? Or much less legible than with a non-abbreviated namespace.

using abbreviations just for the sake of it may be a bad idea, but using it to able to quickly switch between different drivers works really well.

my code is full of stuff like:

import sqlite2 as DB

import wckTkinter as WCK

# import cElementtree as ET
import xml.etree.ElementTree as ET

but you sure won't see

import sys as SY
import os.path as op

or other gratuitous aliasing.



More information about the Python-Dev mailing list