Python Feature Request: Add the "using" keyword which works like "with" in Visual Basic

7stud bbxx789_05ss at yahoo.com
Sat Apr 14 14:57:58 EDT 2007


On Apr 14, 4:42 am, samj... at gmail.com wrote:
> This also is
> similar to the C++ "using" keyword which exposes the members of a
> namespace to access without specifying the namespace scope for each
> reference. For example after giving "using namespace std;" I can
> change all references to "std::cout" to "cout", which is similar to
> what I am proposing for Python now.
>

...which is a bad practice in C++.  When you expose the members of a
namespace, you create the potential for name clashes with the names in
your program.  Why would you want to infect Python with that problem?




More information about the Python-list mailing list