Re: 请教一个怪问题

Zoom.Quiet <[email protected]> Wed, 23 Jan 2008 20:34:44 +0800
Newsgroups gmane.comp.python.chinese
Message-ID <[email protected]>
2008/1/23 fuyu0123456789 <[email protected]>:
>
>
> 各位
>
> 又碰到一个怪问题,请看下面的3个Python文件
>
> main.py:
>

from a import Host as AH
from b import Host as BH
print BH

表,玩自个儿就好

> from a import *
>
> from b import *
>
>
>
> a.py:
>
> Host = "http://www.163.com"
>
> Hosts = {"site":[Host,]}
>
>
>
> b.py
>
> Host =" http://www.google.com"
>
>
>
> 在Shell环境下执行下列代码
>
> import main
>
> main.Hosts
>
>
>
> 但是输出结果是
>
> {'site': ['http://www.163.com']}
>
>
>
> 按我的理解应该是
>
> {'site':['http://www.google.com']}
>
>
>
> 请问是怎么回事啊???
>
>
>
>
>  ________________________________
>  美利山开盘3000人抢购!440套售罄,加推300套17号开始登记!
> _______________________________________________
> python-chinese
> Post: send [email protected]
> Subscribe: send subscribe to [email protected]
> Unsubscribe: send unsubscribe to  [email protected]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
'''http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.
_______________________________________________
python-chinese
Post: send [email protected]
Subscribe: send subscribe to [email protected]
Unsubscribe: send unsubscribe to  [email protected]
Detail Info: http://python.cn/mailman/listinfo/python-chinese