cross-reference

How can I reference a class from a specific documentation with Intersphinx?

How can I reference a class from a specific documentation with Intersphinx? Question: I have set up an Intersphinx-mapping for the documentations of Python 2 and Python 3: intersphinx_mapping = {‘py2’: (‘http://docs.python.org/’, None), ‘py3’: (‘http://docs.python.org/3’, None)} How can I reference a class from a specific of these two resources? The documentation only mentions :ref:erences and …

Total answers: 2

Simple cross import in python

Simple cross import in python Question: I want to separate code in different class and put them to different files. However those class are dependent on each other. main.py: from lib import A, B def main(): a = A() b = B() a.hello() b.hello() if __name__ == ‘__main__’: main() lib/_init_.py: from a import A from …

Total answers: 4