From 389725160295b4a8844dabf833996f4ae3bbde4a Mon Sep 17 00:00:00 2001 From: stroeder Date: Sun, 19 Nov 2017 15:52:43 +0000 Subject: [PATCH] ldap.dn: use Boolean for notypes --- Doc/ldap-dn.rst | 4 ++-- Lib/ldap/dn.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/ldap-dn.rst b/Doc/ldap-dn.rst index d78f070..d896e4c 100644 --- a/Doc/ldap-dn.rst +++ b/Doc/ldap-dn.rst @@ -49,7 +49,7 @@ The :mod:`ldap.dn` module defines the following functions: function :func:`escape_dn_chars`. -.. function:: explode_dn(dn [, notypes=0[, flags=0]]) -> list +.. function:: explode_dn(dn [, notypes=False[, flags=0]]) -> list This function takes *dn* and breaks it up into its component parts. Each part is known as an RDN (Relative Distinguished Name). The optional *notypes* @@ -60,7 +60,7 @@ The :mod:`ldap.dn` module defines the following functions: deprecated. -.. function:: explode_rdn(rdn [, notypes=0[, flags=0]]) -> list +.. function:: explode_rdn(rdn [, notypes=False[, flags=0]]) -> list This function takes a (multi-valued) *rdn* and breaks it up into a list of characteristic attributes. The optional *notypes* parameter is used to specify diff --git a/Lib/ldap/dn.py b/Lib/ldap/dn.py index 1d70058..3298551 100644 --- a/Lib/ldap/dn.py +++ b/Lib/ldap/dn.py @@ -62,9 +62,9 @@ def dn2str(dn): for rdn in dn ]) -def explode_dn(dn,notypes=0,flags=0): +def explode_dn(dn, notypes=False, flags=0): """ - explode_dn(dn [, notypes=0]) -> list + explode_dn(dn [, notypes=False [, flags=0]]) -> list This function takes a DN and breaks it up into its component parts. The notypes parameter is used to specify that only the component's @@ -88,9 +88,9 @@ def explode_dn(dn,notypes=0,flags=0): return rdn_list -def explode_rdn(rdn,notypes=0,flags=0): +def explode_rdn(rdn, notypes=False, flags=0): """ - explode_rdn(rdn [, notypes=0]) -> list + explode_rdn(rdn [, notypes=0 [, flags=0]]) -> list This function takes a RDN and breaks it up into its component parts if it is a multi-valued RDN.