Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bodnár Zsombor
python-kszkepzes
Commits
1d44d331
Commit
1d44d331
authored
Mar 27, 2019
by
Bodor Máté
Browse files
v0.13
parent
ddf2b7d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
PITCHME.md
View file @
1d44d331
# Python 3 alapok
# Python3
```
python
import
this
```
---
### The Zen of Python, by Tim Peters
<div
class=
"half left"
>
<ol>
@size
[
24px
](
<
li
><b>
Beautiful is better than ugly.
</b></li>
)
@size
[
24px
](
<
li
><b>
Explicit is better than implicit.
</b></li>
)
@size
[
24px
](
<
li
><b>
Simple is better than complex.
</b></li>
)
@size
[
24px
](
<
li
><b>
Complex is better than complicated.
</b></li>
)
@size
[
24px
](
<
li
>
Flat is better than nested.
</li>
)
@size
[
24px
](
<
li
>
Sparse is better than dense.
</li>
)
@size
[
24px
](
<
li
><b>
Readability counts.
</b></li>
)
@size
[
24px
](
<
li
>
Special cases aren't special enough to break the rules.
</li>
)
@size
[
24px
](
<
li
>
Although practicality beats purity.
</li>
)
@size
[
24px
](
<
li
>
Errors should never pass silently.
</li>
)
@size
[
24px
](
<
li
>
Unless explicitly silenced.
</li>
)
@size
[
24px
](
<
li
>
In the face of ambiguity, refuse the temptation to guess.
</li>
)
</ol>
</div>
<div
class=
"half right"
>
<ol
start=
"13"
>
@size
[
24px
](
<
li
>
There should be one-- and preferably only one --obvious way to do it.
</li>
)
@size
[
24px
](
<
li
>
Although that way may not be obvious at first unless you're Dutch.
</li>
)
@size
[
24px
](
<
li
>
Now is better than never.
</li>
)
@size
[
24px
](
<
li
>
Although never is often better than
<i>
right
</i>
now.
</li>
)
@size
[
24px
](
<
li
><b>
If the implementation is hard to explain, it's a bad idea.
</b></li>
)
@size
[
24px
](
<
li
><b>
If the implementation is easy to explain, it may be a good idea.
</b></li>
)
@size
[
24px
](
<
li
>
Namespaces are one honking great idea -- let's do more of those!
</li>
)
</ol>
</div>
---
...
...
@@ -54,7 +92,7 @@ NEM!
### Tökéletes?!
-
Lassú, nagyon lassú
-
Zabálja a ramot
-
Csak futási hiba
Note:
...
...
@@ -105,6 +143,7 @@ Note:
Note:
---
### Pip
...
...
@@ -121,43 +160,68 @@ Note:
-
C++ ban jóval nehezebb
+++
```
bash
pip
install
flake8
```
pip install flake8/black
```
---
### Flake8
-
linter
-
segít jobb kódot írni:
-
syntax error
-
typo
-
rossz formázás
-
pep8
Note:
pep8:
-
Style Guide
-
átlátható
-
egységes
-
kevesebb merge conflict
---
### Virtualenv
-
saját környezet minden projekthez
-
a
-
b
-
saját környezet minden projekthez
Note:
-
Dependensy, egy csomag több verzió
+++
-
Windows:
```
-
Windows:
```
cmd
python -m venv venv
```
```
```
cmd
venv\Scripts\activate.bat
```
+++
-
Linux:
```
-
Linux:
```
bash
python3
-m
venv venv
```
```
```
bash
source
venv
\b
in
\a
ctivate
```
---
### Hello World
!
### Hello World
+++
+++
```
python
print
(
"Hello World!"
)
...
...
@@ -165,7 +229,7 @@ print("Hello World!")
+++
```
```
bash
pip
install
colorama
```
...
...
Write
Preview
Supports
Markdown
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