To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 4fb0453a authored by vermeul's avatar vermeul
Browse files

Update 04-Values_and_Expressions.md

parent b23ad6d5
......@@ -2,7 +2,7 @@
## Long strings
Code should not become longer than about 120 characters, but strings often get much longer. Use round brackets `( )` on mutltiple strings to create a long string. Use the K&R style (opening bracket must stay on first line!) for improved readability:
Code should not become longer than about 120 characters, but strings often get much longer. Use round brackets `( )` on mutltiple strings to create a long string. Use the [K&R style](https://en.wikipedia.org/wiki/Indentation_style#K&R_style) (opening bracket must stay on first line!) for improved readability:
```python
my_long_string = (
......@@ -13,7 +13,7 @@ my_long_string = (
"kapitän"
)
# will be automatically concatenated to Donaudampfschifffahrtsgesellschaftskapitän
# will be magically concatenated to Donaudampfschifffahrtsgesellschaftskapitän
```
## Multiline strings
......@@ -25,7 +25,7 @@ lines = "first line\n"\
"second line\n"\
"third line"
```
However, putting all the backslashes at the end of each line makes the code noisy. Here is a better way, which allows K&R style:
However, putting all the backslashes at the end of each line makes the code noisy. Here is a better way, which also uses [K&R style](https://en.wikipedia.org/wiki/Indentation_style#K&R_style):
<strong>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment