![]() | Modules |
def square(x):
return x*x
>>> import pytest
>>> square(2)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
>>> execfile('pytest.py')
>>> square(2)
4
>>> pytest.square
<function square at 0x3aceb0>
>>> sq = pytest.square
>>> sq(4)
16
import rdflib.TripleStore imports
the module but nothing in the
module. So to reference anything in the module, you must
go through it.TripleStore =
rdflib.TripleStore.TripleStorefrom rdflib.TripleStore import
TripleStore is sugar for the above trickfrom foo import *10 of 11 |
