Skip to content

Commit 9005ba9

Browse files
authored
Doc: Use bytes for attribute values in example
#317 Fixes: #306
1 parent 7196171 commit 9005ba9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/reference/ldif.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ Example
6161
The following example demonstrates how to write LDIF output
6262
of an LDAP entry with :mod:`ldif` module.
6363

64-
>>> import sys,ldif
65-
>>> entry={'objectClass':['top','person'],'cn':['Michael Stroeder'],'sn':['Stroeder']}
64+
>>> import sys, ldif
65+
>>> entry={'objectClass': [b'top', b'person'], 'cn': [b'Michael Stroeder'], 'sn': [b'Stroeder']}
6666
>>> dn='cn=Michael Stroeder,ou=Test'
6767
>>> ldif_writer=ldif.LDIFWriter(sys.stdout)
68-
>>> ldif_writer.unparse(dn,entry)
68+
>>> ldif_writer.unparse(dn, entry)
6969
dn: cn=Michael Stroeder,ou=Test
7070
cn: Michael Stroeder
7171
objectClass: top

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy