資源簡介
代碼片段和文件信息
#!/usr/bin/env?python3
#?Copyright?2014?Brett?Slatkin?Pearson?Education?Inc.
#
#?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
#?you?may?not?use?this?file?except?in?compliance?with?the?License.
#?You?may?obtain?a?copy?of?the?License?at
#
#?????http://www.apache.org/licenses/LICENSE-2.0
#
#?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
#?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
#?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
#?See?the?License?for?the?specific?language?governing?permissions?and
#?limitations?under?the?License.
#?Preamble?to?mimick?book?environment
import?logging
from?pprint?import?pprint
from?sys?import?stdout?as?STDOUT
#?Example?12
from?mypackage?import?*
a?=?Projectile(1.5?3)
b?=?Projectile(4?1.7)
after_a?after_b?=?simulate_collision(a?b)
print(after_a.__dict__?after_b.__dict__)
import?mypackage
try:
????mypackage._dot_product
????assert?False
except?AttributeError:
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1074??2015-12-06?09:28??item_50\api_package\api_consumer.py
?????文件????????780??2015-12-06?09:28??item_50\api_package\main.py
?????文件????????902??2015-12-06?09:28??item_50\api_package\mypackage\models.py
?????文件???????1006??2015-12-06?09:28??item_50\api_package\mypackage\utils.py
?????文件????????862??2015-12-06?09:28??item_50\api_package\mypackage\__init__.py
?????文件????????853??2015-12-06?09:28??item_50\namespace_package\analysis\utils.py
?????文件????????753??2015-12-06?09:28??item_50\namespace_package\analysis\__init__.py
?????文件????????826??2015-12-06?09:28??item_50\namespace_package\frontend\utils.py
?????文件????????753??2015-12-06?09:28??item_50\namespace_package\frontend\__init__.py
?????文件????????895??2015-12-06?09:28??item_50\namespace_package\main.py
?????文件????????896??2015-12-06?09:28??item_50\namespace_package\main2.py
?????文件????????960??2015-12-06?09:28??item_50\namespace_package\main3.py
?????目錄??????????0??2018-04-25?23:23??item_50\api_package\mypackage
?????目錄??????????0??2018-04-25?23:23??item_50\namespace_package\analysis
?????目錄??????????0??2018-04-25?23:23??item_50\namespace_package\frontend
?????目錄??????????0??2018-04-25?23:23??item_50\api_package
?????目錄??????????0??2018-04-25?23:23??item_50\namespace_package
?????目錄??????????0??2018-04-25?23:23??item_50
-----------?---------??----------?-----??----
????????????????10560????????????????????18
- 上一篇:Python實現(xiàn)畫圓的功能
- 下一篇:python 計算猴子吃桃問題
評論
共有 條評論