Fix comment syntax for Ruby and Python

pull/8832/head
Bu Sun Kim 3 years ago committed by GitHub
parent c9baf39caa
commit 6e0a456c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      docs/field_presence.md

@ -372,10 +372,10 @@ No presence:
```python
m = example.Msg()
if m.foo != 0:
// "Clear" the field:
# "Clear" the field:
m.foo = 0
else:
// Default value: field may not have been present.
# Default value: field may not have been present.
m.foo = 1
```
@ -384,10 +384,10 @@ Explicit presence:
```python
m = example.Msg()
if m.HasField('foo'):
// Clear the field:
# Clear the field:
m.ClearField('foo')
else:
// Field is not present, so set it.
# Field is not present, so set it.
m.foo = 1
```
@ -398,10 +398,10 @@ No presence:
```ruby
m = Msg.new
if m.foo != 0
// "Clear" the field:
# "Clear" the field:
m.foo = 0
else
// Default value: field may not have been present.
# Default value: field may not have been present.
m.foo = 1
end
```
@ -411,10 +411,10 @@ Explicit presence:
```ruby
m = Msg.new
if m.has_foo?
// Clear the field:
# Clear the field:
m.clear_foo
else
// Field is not present, so set it.
# Field is not present, so set it.
m.foo = 1
end
```

Loading…
Cancel
Save