Skip to content

Commit 521b2cc

Browse files
author
Jerry George
committed
Minor Documentation changes for code samples
Change-Id: I2d13fe2884d9eaebd112d342041e2e219bf6a240
1 parent 149ce52 commit 521b2cc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

HACKING.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ commandline arguments, etc.) should be presumed to be encoded as utf-8.
8383

8484
WRONG:
8585

86+
infile = open('testfile', 'r')
8687
mystring = infile.readline()
8788
myreturnstring = do_some_magic_with(mystring)
8889
outfile.write(myreturnstring)
8990

9091
RIGHT:
9192

93+
infile = open('testfile', 'r')
9294
mystring = infile.readline()
93-
mytext = s.decode('utf-8')
95+
mytext = mystring.decode('utf-8')
9496
returntext = do_some_magic_with(mytext)
9597
returnstring = returntext.encode('utf-8')
9698
outfile.write(returnstring)

0 commit comments

Comments
 (0)