Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/279926

Change subject: [doc] Additional documentation for site.namespace()
......................................................................

[doc] Additional documentation for site.namespace()

site.namespace(num, True) does not return a list but a Namespace object.

Change-Id: I0e2d5d9040c8b2fce25147b95ee55a255297d42e
---
M pywikibot/site.py
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/26/279926/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index b198dc2..09b0d36 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2826,8 +2826,15 @@
     def namespace(self, num, all=False):
         """Return string containing local name of namespace 'num'.
 
-        If optional argument 'all' is true, return a list of all recognized
+        If optional argument 'all' is true, return all recognized
         values for this namespace.
+
+        @param num: Namespace constant.
+        @type num: int
+        @param all: If True return a Namespace object. Otherwise
+            return the namespace name.
+        @return: local name or Namespace object
+        @rtype: str or Namespace
         """
         if all:
             return self.namespaces[num]

-- 
To view, visit https://gerrit.wikimedia.org/r/279926
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e2d5d9040c8b2fce25147b95ee55a255297d42e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to