Ejemplo n.º 1
0
def func_3_3():
    print('--- 5.3.3 ---')
    '''
    モジュールから一つ以上の部品だけをインポートすることができる。
    もとの名前にするか別名を使うかは部品ごとに決められる。
    '''
    # もとの名前でインポートする
    from report import get_description
    print("Today's weather:", get_description())

    # 別名(do_it)でインポートする
    from report import get_description as do_it
    print("Today's weather:", do_it())
Ejemplo n.º 2
0
# -*- coding: utf-8 -*-
"""
Created on Sat Jul  8 11:21:21 2017

@author: Nathan
"""

from report import get_description as do_it

description = do_it()
print("Today's weather is:", description)
Ejemplo n.º 3
0
from report import get_description as do_it
description = do_it()
print("Today's weather:", description)

Ejemplo n.º 4
0
import report as wr
from report import get_description as do_it

description = wr.get_description()
print("Today's weather: ", description)

description1 = do_it()
print("Today's weather: ", description1)