Ian D <dux...@hotmail.com> writes: > is > import longModuleName as lmn > > or > > lmn = longModuleName > > creating an alias or assigning to a variable..... or both?
Assignment and import both bind a name to an object. NAmes are one (common) kind of reference. The only way to get at objects is by using a reference. So, this distinction you're drawing doesn't exist in Python. When you use a name, you're using a reference to an object. When you assign (or, when ‘import’ assigns) the same object to a different name, the names are both references to the same object, without any name having a special status. -- \ “True greatness is measured by how much freedom you give to | `\ others, not by how much you can coerce others to do what you | _o__) want.” —Larry Wall | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor