Skip to content

Commit

Permalink
ldap.dn: use Boolean for notypes
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder authored and Petr Viktorin committed Nov 22, 2017
1 parent 9935cb8 commit 3897251
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Doc/ldap-dn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Lib/ldap/dn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 3897251

Please sign in to comment.