other python ideas

Peter Gavin gavin at coaps.fsu.edu
Tue May 30 13:06:15 EDT 2000

Laurent POINTAL wrote:
> In our modules, we use the following syntax to avoid publication of
> imported symbols (copied from... I dont remember which Python source):
> import string
> _string = string
> del string
> And we always prefix string operation functions by _string.

This looks like a good idea.  Wouldn't it be useful to be able to do it
in one step?
It shouldn't be too hard to add a syntax similar to:

import string as _string

That would eliminate the need for _string = string; del string.

Peter Gavin
<gavin at coaps.fsu.edu>

More information about the Python-list mailing list