diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-30 21:22:20 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-30 21:22:20 +0000 |
| commit | 8d8440c410a3970b3d6e5b7ac4cba9fc4a47ad11 (patch) | |
| tree | 47deb43830fec13377bc396569e40dda42b086d5 | |
| parent | 6787017bdc947757dc3cd11b47ff5338f489237b (diff) | |
| parent | 521b2cc5dc2575d41b1e3d4509c3d8bb35290e00 (diff) | |
| download | python-openstackclient-8d8440c410a3970b3d6e5b7ac4cba9fc4a47ad11.tar.gz | |
Merge "Minor Documentation changes for code samples"
| -rw-r--r-- | HACKING.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/HACKING.rst b/HACKING.rst index 27c5e485..b7cc831c 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -83,14 +83,16 @@ commandline arguments, etc.) should be presumed to be encoded as utf-8. WRONG: + infile = open('testfile', 'r') mystring = infile.readline() myreturnstring = do_some_magic_with(mystring) outfile.write(myreturnstring) RIGHT: + infile = open('testfile', 'r') mystring = infile.readline() - mytext = s.decode('utf-8') + mytext = mystring.decode('utf-8') returntext = do_some_magic_with(mytext) returnstring = returntext.encode('utf-8') outfile.write(returnstring) |
