r...@zedat.fu-berlin.de (Stefan Ram) writes:

> Wolfgang Maier <wolfgang.ma...@biologie.uni-freiburg.de> writes:
>>If you're worried bout having things on separate lines, you could write:
>>import os; os.getcwd()
>>,etc., which is actually saving a few characters :)
>
>   Yes, but there still is the risk of the identifier »os«
>   already being used in the sorrounding code. While
>
> __import__( "os" ).getcwd()
>
>   does not seem to "leak" names into the enclosing scope.

Also it's an expression which may be important in your "quick and dirty"
scripts.

-- 
Ben.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to