Skip to content

Commit 5ab93d3

Browse files
committed
Removed spaces before new lines
1 parent c7e67ed commit 5ab93d3

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ list_of_chars = list(<str>)
4646
```
4747

4848
```python
49-
index = <list>.index(<el>) # Returns first index of item.
49+
index = <list>.index(<el>) # Returns first index of item.
5050
<list>.insert(index, <el>) # Inserts item at index and moves the rest to the right.
5151
<el> = <list>.pop([index]) # Removes and returns item at index or from the end.
5252
<list>.remove(<el>) # Removes first occurrence of item or raises ValueError.
53-
<list>.clear() # Removes all items.
53+
<list>.clear() # Removes all items.
5454
```
5555

5656

@@ -289,9 +289,9 @@ import re
289289
```
290290

291291
* **Parameter `'flags=re.IGNORECASE'` can be used with all functions.**
292-
* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.**
293-
* **Use `r'\1'` or `'\\1'` for backreference.**
294-
* **Use `'?'` to make operator non-greedy.**
292+
* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.**
293+
* **Use `r'\1'` or `'\\1'` for backreference.**
294+
* **Use `'?'` to make operator non-greedy.**
295295

296296
### Match Object
297297
```python
@@ -424,7 +424,7 @@ from itertools import product, combinations, combinations_with_replacement, perm
424424

425425
```python
426426
>>> product([0, 1], repeat=3)
427-
[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1),
427+
[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1),
428428
(1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)]
429429
```
430430

@@ -441,15 +441,15 @@ from itertools import product, combinations, combinations_with_replacement, perm
441441

442442
```python
443443
>>> combinations_with_replacement('abc', 2)
444-
[('a', 'a'), ('a', 'b'), ('a', 'c'),
445-
('b', 'b'), ('b', 'c'),
444+
[('a', 'a'), ('a', 'b'), ('a', 'c'),
445+
('b', 'b'), ('b', 'c'),
446446
('c', 'c')]
447447
```
448448

449449
```python
450450
>>> permutations('abc', 2)
451-
[('a', 'b'), ('a', 'c'),
452-
('b', 'a'), ('b', 'c'),
451+
[('a', 'b'), ('a', 'c'),
452+
('b', 'a'), ('b', 'c'),
453453
('c', 'a'), ('c', 'b')]
454454
```
455455

@@ -505,7 +505,7 @@ from dateutil.tz import UTC, tzlocal, gettz
505505
* **ISO strings come in following forms: `'YYYY-MM-DD'`, `'HH:MM:SS.ffffff[±<offset>]'`, or both separated by `'T'`.**
506506
* **On Unix systems Epoch is `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...**
507507

508-
### Decode
508+
### Decode
509509
```python
510510
<str> = <D/T/DT>.isoformat() # ISO string representation.
511511
<str> = <D/T/DT>.strftime('<format>') # Custom string representation.
@@ -549,7 +549,7 @@ Splat Operator
549549
```python
550550
args = (1, 2)
551551
kwargs = {'x': 3, 'y': 4, 'z': 5}
552-
func(*args, **kwargs)
552+
func(*args, **kwargs)
553553
```
554554

555555
#### Is the same as:
@@ -677,7 +677,7 @@ creature = Creature()
677677
Closure
678678
-------
679679
**We have a closure in Python when:**
680-
* **A nested function references a value of its enclosing function and then**
680+
* **A nested function references a value of its enclosing function and then**
681681
* **the enclosing function returns the nested function.**
682682

683683
```python
@@ -839,7 +839,7 @@ class MyComparable:
839839
def __eq__(self, other):
840840
if isinstance(other, type(self)):
841841
return self.a == other.a
842-
return False
842+
return False
843843
```
844844

845845
### Hashable
@@ -857,7 +857,7 @@ class MyHashable:
857857
def __eq__(self, other):
858858
if isinstance(other, type(self)):
859859
return self.a == other.a
860-
return False
860+
return False
861861
def __hash__(self):
862862
return hash(self.a)
863863
```
@@ -928,7 +928,7 @@ Enum
928928
from enum import Enum, auto
929929

930930
class <enum_name>(Enum):
931-
<member_name_1> = <value_1>
931+
<member_name_1> = <value_1>
932932
<member_name_2> = <value_2_a>, <value_2_b>
933933
<member_name_3> = auto()
934934

@@ -1278,7 +1278,7 @@ Bytes
12781278

12791279
### Decode
12801280
```python
1281-
<str> = <bytes>.decode(encoding='utf-8')
1281+
<str> = <bytes>.decode(encoding='utf-8')
12821282
<int> = int.from_bytes(<bytes>, byteorder='big|little', signed=False)
12831283
<hex> = <bytes>.hex()
12841284
```
@@ -1352,7 +1352,7 @@ Memory View
13521352
**Used for accessing the internal data of an object that supports the buffer protocol.**
13531353

13541354
```python
1355-
<memoryview> = memoryview(<bytes> / <bytearray> / <array>)
1355+
<memoryview> = memoryview(<bytes> / <bytearray> / <array>)
13561356
<memoryview>.release()
13571357
```
13581358

@@ -1494,7 +1494,7 @@ last_el = op.methodcaller('pop')(<list>)
14941494
```
14951495

14961496

1497-
Eval
1497+
Eval
14981498
----
14991499
### Basic
15001500
```python
@@ -1555,14 +1555,14 @@ def eval_node(node):
15551555

15561556
Coroutine
15571557
---------
1558-
* **Similar to generator, but generator pulls data through the pipe with iteration, while coroutine pushes data into the pipeline with send().**
1559-
* **Coroutines provide more powerful data routing possibilities than iterators.**
1560-
* **If you built a collection of simple data processing components, you can glue them together into complex arrangements of pipes, branches, merging, etc.**
1558+
* **Similar to generator, but generator pulls data through the pipe with iteration, while coroutine pushes data into the pipeline with send().**
1559+
* **Coroutines provide more powerful data routing possibilities than iterators.**
1560+
* **If you built a collection of simple data processing components, you can glue them together into complex arrangements of pipes, branches, merging, etc.**
15611561

15621562
### Helper Decorator
1563-
* **All coroutines must be "primed" by first calling next().**
1564-
* **Remembering to call next() is easy to forget.**
1565-
* **Solved by wrapping coroutines with a decorator:**
1563+
* **All coroutines must be "primed" by first calling next().**
1564+
* **Remembering to call next() is easy to forget.**
1565+
* **Solved by wrapping coroutines with a decorator:**
15661566

15671567
```python
15681568
def coroutine(func):
@@ -1691,7 +1691,7 @@ rotation=<int>|<datetime.timedelta>|<datetime.time>|<str>
16911691
retention=<int>|<datetime.timedelta>|<str>
16921692
```
16931693
* **`'<int>'` - Max number of files.**
1694-
* **`'<timedelta>'` - Max age of a file.**
1694+
* **`'<timedelta>'` - Max age of a file.**
16951695
* **`'<str>'` - Max age as a string: `'1 week, 3 days'`, `'2 months'`, ...**
16961696

16971697
### Compression

0 commit comments

Comments
 (0)