##// END OF EJS Templates
ENH: Docstrings for the user namespace API.
Robert Kern -
Show More
@@ -564,6 +564,19 b' def make_user_ns(user_ns = None):'
564 564 This builds a dict with the minimal information needed to operate as a
565 565 valid IPython user namespace, which you can pass to the various embedding
566 566 classes in ipython.
567
568 This API is currently deprecated. Use ipapi.make_user_namespaces() instead
569 to make both the local and global namespace objects simultaneously.
570
571 :Parameters:
572 user_ns : dict-like, optional
573 The current user namespace. The items in this namespace should be
574 included in the output. If None, an appropriate blank namespace
575 should be created.
576
577 :Returns:
578 A dictionary-like object to be used as the local namespace of the
579 interpreter.
567 580 """
568 581
569 582 raise NotImplementedError
@@ -574,7 +587,20 b' def make_user_global_ns(ns = None):'
574 587
575 588 Similar to make_user_ns(), but global namespaces are really only needed in
576 589 embedded applications, where there is a distinction between the user's
577 interactive namespace and the global one where ipython is running."""
590 interactive namespace and the global one where ipython is running.
591
592 This API is currently deprecated. Use ipapi.make_user_namespaces() instead
593 to make both the local and global namespace objects simultaneously.
594
595 :Parameters:
596 ns : dict, optional
597 The current user global namespace. The items in this namespace
598 should be included in the output. If None, an appropriate blank
599 namespace should be created.
600
601 :Returns:
602 A true dict to be used as the global namespace of the interpreter.
603 """
578 604
579 605 raise NotImplementedError
580 606
@@ -598,6 +624,20 b' def make_user_namespaces(user_ns = None,user_global_ns = None):'
598 624 namespace synchronize with the globals dict somehow.
599 625
600 626 Raises TypeError if the provided globals namespace is not a true dict.
627
628 :Parameters:
629 user_ns : dict-like, optional
630 The current user namespace. The items in this namespace should be
631 included in the output. If None, an appropriate blank namespace
632 should be created.
633 user_global_ns : dict, optional
634 The current user global namespace. The items in this namespace
635 should be included in the output. If None, an appropriate blank
636 namespace should be created.
637
638 :Returns:
639 A tuple pair of dictionary-like object to be used as the local namespace
640 of the interpreter and a dict to be used as the global namespace.
601 641 """
602 642
603 643 if user_ns is None:
General Comments 0
You need to be logged in to leave comments. Login now