module confusion

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Oct 4 19:28:45 EDT 2007


In message <13gasot6r5bnu1a at corp.supernews.com>, Steven D'Aprano wrote:

> What does type(os.path) return when you try it?

It returns the type of the value contained in that variable, of course:

    >>> import os
    >>> os.path = 3
    >>> type(os.path)
    <type 'int'>

See, it's just a variable, like any other.



More information about the Python-list mailing list