Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
16b31d2a
Commit
16b31d2a
authored
Oct 07, 2008
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Python example output identical to C++ and Java by removing redundant
spaces.
parent
a41a9dd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
list_people.py
examples/list_people.py
+3
-3
No files found.
examples/list_people.py
View file @
16b31d2a
...
@@ -15,11 +15,11 @@ def ListPeople(address_book):
...
@@ -15,11 +15,11 @@ def ListPeople(address_book):
for
phone_number
in
person
.
phone
:
for
phone_number
in
person
.
phone
:
if
phone_number
.
type
==
addressbook_pb2
.
Person
.
MOBILE
:
if
phone_number
.
type
==
addressbook_pb2
.
Person
.
MOBILE
:
print
" Mobile phone #:
"
,
print
" Mobile phone #:"
,
elif
phone_number
.
type
==
addressbook_pb2
.
Person
.
HOME
:
elif
phone_number
.
type
==
addressbook_pb2
.
Person
.
HOME
:
print
" Home phone #:
"
,
print
" Home phone #:"
,
elif
phone_number
.
type
==
addressbook_pb2
.
Person
.
WORK
:
elif
phone_number
.
type
==
addressbook_pb2
.
Person
.
WORK
:
print
" Work phone #:
"
,
print
" Work phone #:"
,
print
phone_number
.
number
print
phone_number
.
number
# Main procedure: Reads the entire address book from a file and prints all
# Main procedure: Reads the entire address book from a file and prints all
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment